EvilZone
Programming and Scripting => Scripting Languages => : relax November 16, 2012, 02:51:11 PM
-
so the aoutoitscript.com (http://aoutoitscript.com) is down and im doing a little script witch i have problem with
ps: started with autoit today so im a complete noob
i have a editbox
$txt = GUICtrlCreateEdit("",0,0,800,560)
i want to replace all spaces with . when the editbox is changed, so some sort of onchange function
tryed some scripts but it outbut backwards and displays wrong, so im doing somthing wrong
#include <GUIConstantsEx.au3>
Example()
Func Example()
Local $font, $msg
Global $txt
GUICreate("Relax",950,595) ; will create a dialog box that when displayed is centered
$font = "Tahoma"
GUISetFont(12, 400, 1, $font) ; will display underlined characters
$txt = GUICtrlCreateEdit("",0,0,800,560)
$list = GUICtrlCreateList("",800,0,150,610)
$save = GUICtrlCreateButton(" Save ",0,562)
$exe = GUICtrlCreateButton(" Execute ",50,562)
GUIRegisterMsg(0x0111, "MY_WM_COMMAND")
GUISetState()
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
EndFunc ;==>Example
Func MY_WM_COMMAND($hWnd, $Msg, $wParam, $lParam)
Local $nID
$nID = BitAND($wParam, 0x0000FFFF)
if $nID = 3 Then
$orgtext = ControlGetText("Relax","",3)
$newtext = StringReplace(ControlGetText("Relax","",3)," ", ".")
$mystring=ControlGetText("Relax","",3)
MsgBox(0,"",$mystring)
$reverse_string = ""
$string_length = StringLen($mystring)
For $i = 1 to $string_length
$last_n_chrs = StringRight($mystring, $i)
$nth_chr = StringTrimRight($last_n_chrs, $i-1)
$reverse_string= $reverse_string & $nth_chr
Next
ControlSetText("Relax","",3,$reverse_string)
EndIf
Return $GUI_RUNDEFMSG
EndFunc ;==>MY_WM_COMMAND
if anyone have an ebook or something that would help also
thanks
-
Yeap, the site is under maintance. Here are 2 good resources
http://upload.evilzone.org/download.php?id=9041884&type=rar (http://upload.evilzone.org/download.php?id=9041884&type=rar) Learning to Script with AutoIt V3
http://upload.evilzone.org/download.php?id=6986865&type=rar (http://upload.evilzone.org/download.php?id=6986865&type=rar) Autoit_123
Look also in the help file for StringReplace() StringRegExpReplace
A small snippet
#notrayicon
$input = FileOpen("c:\relax.txt", 0)
$output = FileOpen("c:\relax.tmp", 2)
;Check if the files were opened successfully.
If $input = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
If $output = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
;Parse the text beginning with a HUID
While 1
$inline = FileReadLine($input)
If @error Then ExitLoop
If StringInStr($inline, "H8") Then
FileWriteLine($output, StringRegExpReplace($inline, "(\s+)". "."))
EndIf
WEnd
FileClose($input)
FileClose($output)
-
Yeap, the site is under maintance. Here are 2 good resources
http://upload.evilzone.org/download.php?id=9041884&type=rar (http://upload.evilzone.org/download.php?id=9041884&type=rar) Learning to Script with AutoIt V3
http://upload.evilzone.org/download.php?id=6986865&type=rar (http://upload.evilzone.org/download.php?id=6986865&type=rar) Autoit_123
Look also in the help file for StringReplace() StringRegExpReplace
A small snippet
#notrayicon
$input = FileOpen("c:\relax.txt", 0)
$output = FileOpen("c:\relax.tmp", 2)
;Check if the files were opened successfully.
If $input = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
If $output = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
;Parse the text beginning with a HUID
While 1
$inline = FileReadLine($input)
If @error Then ExitLoop
If StringInStr($inline, "H8") Then
FileWriteLine($output, StringRegExpReplace($inline, "(\s+)". "."))
EndIf
WEnd
FileClose($input)
FileClose($output)
thanks again geXXos, i did search for autoit in ebooks and dident find anything tho a was sure i had seen it before, must have made som mistake.
-
There is another one from O'Reilly,but no so good as the one i provided above.
Here it is: AutoIt v3 your quick guide
http://upload.evilzone.org/download.php?id=8287810&type=rar
-
I like autoit... although I need to get back to it... Its nice and easy to get some basic functions done with a GUI my main scripting language bitch is batch xD
-
AutoIt is very useful and an experienced coder can create some nice stuff,but i'm fed up with the fact that even a simple script gets flagged as a trojan.