Jump to content
Sign in to follow this  
Pharon

Seeing if a browser is done loading?

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

$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 by Pharon

Share this post


Link to post
Share on other sites

$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.

<{POST_SNAPBACK}>

???

$alphabet = StringSplit('abcdefghijklmnopqrstuvwxyz!@#$%^&*()-_=+,./;''[]\<>?:"{}|', '')
For $i = 1 to $alphabet[0]
     $letter = $alphabet[$i]
     msgbox(0, 0, $letter)
Next

How about that? (Note the double apostrophe (') to put an actual apostrophe in the string).

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

It will print up to

abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()

then it cuts off.  :lmao:

<{POST_SNAPBACK}>

Notice the next character, -, is a hotkey...

Share this post


Link to post
Share on other sites

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 by Pharon

Share this post


Link to post
Share on other sites

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
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?

Share this post


Link to post
Share on other sites

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.
  :)

Share this post


Link to post
Share on other sites

Thanks that helped but...

HotKeySet("{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.

Share this post


Link to post
Share on other sites

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 ??? :lmao:

seriously: Scripts are really very hard to read without proper formatting......

Edited 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.
  :)

Share this post


Link to post
Share on other sites

.. 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
WEnd

Untested though. I don't have time right now.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...