Pharon Posted February 27, 2005 Share Posted February 27, 2005 At the bottom of the window, when a page is done loading it says done, is there anyway for AutoIt to read this? Link to comment Share on other sites More sharing options...
Insolence Posted February 27, 2005 Share Posted February 27, 2005 Pixels, you can search for a few of the pixels it creates when it's done. Use PixelGetColor: If PixelGetColor(x,y) = pixel Then ;do stuff here EndIF "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
Pharon Posted February 27, 2005 Author Share Posted February 27, 2005 Alright I can get done into a variable, how do I check it so that if done is true then it will perform the next thing? Link to comment Share on other sites More sharing options...
Pharon Posted February 27, 2005 Author Share Posted February 27, 2005 ah thanks larry it works perfectly, now, I can make numbers count up, is there a way to do it with letters going a-z? Link to comment Share on other sites More sharing options...
therks Posted February 27, 2005 Share Posted February 27, 2005 Easiest way I can think of is to use an Array with the alphabet. Here's a conceptual idea: $alphabet = StringSplit('abcdefghijklmnopqrstuvwxyz', '') For $i = 1 to 26 $letter = $alphabet[$i] msgbox(0, 0, $letter) Next My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Pharon Posted February 28, 2005 Author Share Posted February 28, 2005 (edited) $alphabet = StringSplit('abcdefghijklmnopqrstuvwxyz', '') For $i = 1 to 26 $letter = $alphabet[$i] msgbox(0, 0, $letter) Next Thanks that works except, I also need to put in !@#$%^&*()-_=+,./;'[]\<>?:"{}| into the stringsplit, but I can't figure out how without it trying to make it into another command. Edited February 28, 2005 by Pharon Link to comment Share on other sites More sharing options...
therks Posted February 28, 2005 Share Posted February 28, 2005 $alphabet = StringSplit('abcdefghijklmnopqrstuvwxyz', '') For $i = 1 to 26 $letter = $alphabet[$i] msgbox(0, 0, $letter) NextThanks that works except, I also need to put in !@#$%^&*()-_=+,./;'[]\<>?:"{}| into the stringsplit, but I can't figure out how without it trying to make it into another command.<{POST_SNAPBACK}>???$alphabet = StringSplit('abcdefghijklmnopqrstuvwxyz!@#$%^&*()-_=+,./;''[]\<>?:"{}|', '') For $i = 1 to $alphabet[0] $letter = $alphabet[$i] msgbox(0, 0, $letter) NextHow about that? (Note the double apostrophe (') to put an actual apostrophe in the string). My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Pharon Posted February 28, 2005 Author Share Posted February 28, 2005 HotKeySet("=", "MyExit") HotKeySet("-", "Start") $alphabet = StringSplit('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()-_=+,./;''[]\<>?:"{}|', '') Do Until 0 Func Start() Do For $i = 1 to 102 $letter = $alphabet[$i] Send($letter) Next Until 0 EndFunc Func MyExit() Exit EndFunc The code does the letters and numbers fine, but it messes up on the symbols, why? Link to comment Share on other sites More sharing options...
Pharon Posted February 28, 2005 Author Share Posted February 28, 2005 It will print up to abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*() then it cuts off. Link to comment Share on other sites More sharing options...
Lanturn Posted March 1, 2005 Share Posted March 1, 2005 It will print up toabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()then it cuts off. <{POST_SNAPBACK}>Notice the next character, -, is a hotkey... Link to comment Share on other sites More sharing options...
Pharon Posted March 2, 2005 Author Share Posted March 2, 2005 (edited) lol, thanks I can't believe I missed that... Edit: What I actually want to do is make a password program, that will start with a, then just keep going up to ab, aba, abac, etc. It's this the best way to do this? Edited March 2, 2005 by Pharon Link to comment Share on other sites More sharing options...
Pharon Posted March 2, 2005 Author Share Posted March 2, 2005 expandcollapse popupHotKeySet("{DEL}", "MyStart") HotKeySet("{INS}", "MyExit") $alphabet = StringSplit('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()-_=+,./;''[]\<>?:"{}|', '') $g = 1 While 1 Sleep (2000) Wend Func MyStart() If $g = 1 Then Do For $i = 1 to 92 $letter = $alphabet[$i] Send($letter,1) Send("{Enter}") Next If $i = 92 then $g = 2 Until 0 EndIf EndIf If $g = 2 Then Do For $i = 1 to 92 $letter = $alphabet[$i] Send("a") Send($letter,1) Send("{Enter}") Next Until 0 EndIf EndFunc Func MyExit() Exit EndFunc I keep getting errors with either Until 0 has no matching do function or EndIf has no matching If function? Link to comment Share on other sites More sharing options...
Developers Jos Posted March 2, 2005 Developers Share Posted March 2, 2005 I keep getting errors with either Until 0 has no matching do function or EndIf has no matching If function?<{POST_SNAPBACK}>Might want to use indenting for your code to see what is happening.This is the output of Tidy ... hope that helps:HotKeySet("{DEL}", "MyStart") HotKeySet("{INS}", "MyExit") $alphabet = StringSplit('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()-_=+,./;' '[]\<>?:"{}|', '') $g = 1 While 1 Sleep(2000) WEnd Func MyStart() If $g = 1 Then Do For $i = 1 To 92 $letter = $alphabet[$i] Send($letter, 1) Send("{Enter}") Next If $i = 92 Then $g = 2 ;### Tidy Error: Level error -> Until is closing previous If Until 0 ;### Tidy Error: Level error -> EndIf is closing previous Do EndIf EndIf If $g = 2 Then Do For $i = 1 To 92 $letter = $alphabet[$i] Send("a") Send($letter, 1) Send("{Enter}") Next Until 0 EndIf EndFunc ;==>MyStart Func MyExit() Exit EndFunc ;==>MyExit SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Pharon Posted March 2, 2005 Author Share Posted March 2, 2005 Thanks that helped but... expandcollapse popupHotKeySet("{DEL}", "MyStart") HotKeySet("{INS}", "MyExit") $alphabet = StringSplit('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()-_=+,./;''[]\<>?:"{}|', '') $g = 1 While 1 Sleep (2000) Wend Func MyStart() Do If $g = 1 Then For $i = 1 to 92 $letter = $alphabet[$i] Send($letter,1) Send("{Enter}") Next If $i = 92 then $g = 2 EndIf EndIf Until 0 Do If $g = 2 Then For $i = 1 to 92 $letter = $alphabet[$i] Send("a") Send($letter,1) Send("{Enter}") Next EndIf Until 0 EndFunc Func MyExit() Exit EndFunc Now it will go through the first part, but when it gets to where it's supposed to put a first, it doesn't. I'm not sure if $g isn't being changed to 2 or whats going on. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 2, 2005 Developers Share Posted March 2, 2005 (edited) Thanks that helped but...Now it will go through the first part, but when it gets to where it's supposed to put a first, it doesn't. I'm not sure if $g isn't being changed to 2 or whats going on.<{POST_SNAPBACK}>You are welcome... but :Did it take you long to get rid of the indents tabs or was it too readable in that way ??? seriously: Scripts are really very hard to read without proper formatting...... Edited March 2, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Pharon Posted March 2, 2005 Author Share Posted March 2, 2005 I just write my scripts in notepad, I don't think I've ever indented them... Link to comment Share on other sites More sharing options...
therks Posted March 3, 2005 Share Posted March 3, 2005 .. You do realize that 0 means false.So you're telling it Do the loop Until 0 equals true. Since 0 will never equal true, you have an endless loop.You don't seem to understand the use of a Do...Until loop, just glancing at your code, it looks like you'd be better off using a While loop.This replaces your first Do...Until loop.While $g = 1 For $i = 1 to 92 $letter = $alphabet[$i] Send($letter,1) Send("{Enter}") Next If $i = 92 then $g = 2 EndIf WEndUntested though. I don't have time right now. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now