• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

AutoIT [Duda principiante] Como hacer...?

Status
Not open for further replies.

0b3y

☢AutoIt c0d3r☢
User
Joined
Nov 9, 2012
Messages
506
Reputation
0
Reaction score
570
Points
93
Credits
0
‎12 Years of Service‎
73%
Hola buenas, estoy empezando a crear código en Autoit y como hay que investigar por cuenta propia y no hay tutoriales me surgieron varias dudas bastante sencillas.

1. Al abrir block de notas y enviar un random me aparecen puntos, como puedo hacer para quitarlos? Alomejor modificando el flag del random?

2. Pensé en crear un code que abra un txt, escriba un código en batch, lo guarde y lo ejecute, alomejor lo estoy complicando mas de lo necesario pero no tengo ni idea. Lo hice así:

Code:
>$var1 = "@echo off{ENTER}color 0A!{ENTER}echo hola mundo!!"

Run("notepad.exe")
	WinWaitActive("Untitled - Notepad")
	send($var1)
WinClose("Untitled - Notepad")
WinWaitActive("Notepad", "Save")
Send("!s")
Pero ahora no se como escribir en la barra de guardar como y poner "algo.bat" .Se que se se suele usar el inf tool pero con la informacion que me da no se que hacer...

image.php


Seguro que hay una forma mas facil de crear un archivo meterle texto y guardar con una extension sin que el usuario se entere,pero no se como.....

3. Si para todo esto quiero hacer antes que haya que clickar un boton para que empiece a trabajar como lo haria ahora?

Code:
>#include 
#include 
#include 
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 613, 429, 192, 132)
$boton = GUICtrlCreateButton("PULSAR", 144, 112, 337, 177, BitOR($BS_DEFPUSHBUTTON,$BS_CENTER,$WS_BORDER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
	Case $GUI_EVENT_CLOSE
		Exit

EndSwitch
WEnd
 
Re: [Duda principiante] Como hacer...?

hi 0b3y,

didn't understand first and second question, but on third, you can use like this

Code:
>
#include 
#include 
#include 
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 613, 429, 192, 132)
$boton = GUICtrlCreateButton("PULSAR", 144, 112, 337, 177, BitOR($BS_DEFPUSHBUTTON,$BS_CENTER,$WS_BORDER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

startup_action() [color="#00FF00"]; run function : startup_action[/color]

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
	Case $GUI_EVENT_CLOSE
		Exit

EndSwitch
WEnd

Func startup_action()
msgbox(0,"", "i'm here ;)")
EndFunc
 
Status
Not open for further replies.
Back
Top