Jump to content

Two Problems


Recommended Posts

First Problem: I scripted a program that involves opening Internet Explorer and then goes to a website. In order for it to get to that wesbite I had it ControlClick() on the address bar. The problem is if I release this to the public, everyone has different start pages. How would I be able to make it so it clicks the address bar no matter what the person's start page is?

Second Problem: Is there anyway I could make something loop continuously throught a script while everything else still runs normally. The only way I could think of to do this was to write that loop in an entirely different AU3 file, and have the other AU3 file run that script (after it's compiled of course). So basically 2 scripts are running at the same time, but is there anyway I could do this all in one script?

Link to comment
Share on other sites

OK how would i do this? The registry paths I found were:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IE4

HKEY_LOCAL_MACHINE\SOFTWARE\Microsfot\IE

As for the installation path it's C:\Program Files\Internet Explorer\iexplore.exe.

And what specifics would you be needing?

Link to comment
Share on other sites

OK here it is (sure hope you dont need the parameters):

IF $Dude_It's_Like_Totally_A_Variable = 37 THEN
    Run()

;    !!!!!!@@@@@@((((((******HERE IS WHERE I NEED THE LOOP TO START******))))))@@@@@@!!!!!!

    Opt() ;¥0µ 91\/3 еp3?
    WinActivate()
    WinWaitActive()
    ControlFocus()
    ControlClick() ;¥0µ 91\/3 еp3?
    Send()
    Send()
    Opt() ;¥0µ 91\/3 еp3?
    A_Function_That_Waits_For_An_IE_Page_To_Finish_Loading()

    Send() ;¥0µ 91\/3 еp3? 
    WinActivate()
    WinWaitActive()
    Send()
    Sleep()
    Send()
    Sleep()
    Send()
    WinActivate()
    WinWaitActive()
    Send()
    Send()

    DO
        Sleep()
    UNTIL WinExists() OR WinExists()

    IF WinExists() THEN ;¥0µ 91\/3 еp3?
        WinActivate()
        A_Function_That_Waits_For_An_IE_Page_To_Finish_Loading()
        Send()
        Send()
        Send()
        Send()
        Send()

        A_Function_That_Waits_For_An_IE_Page_To_Finish_Loading()

        WinActivate()
        WinWaitActive() ;¥0µ 91\/3 еp3?
        Send()
        WinActivate()
        WinWaitActive()
        Send()
        Sleep()
        Send()
        Sleep()
        Send()
        WinActivate()
        WinWaitActive()
        Send()
        Send()
        Send()
        Send()
        A_Function_That_Waits_For_An_IE_Page_To_Finish_Loading()
        ControlClick() ;¥0µ 91\/3 еp3?
        Sleep()
        Send() ;¥0µ 91\/3 еp3?
        Send()
        Send() ;¥0µ 91\/3 еp3?
    ENDIF

    IF WinExists() THEN
        WinActivate()
        A_Function_That_Waits_For_An_IE_Page_To_Finish_Loading()

        WinActivate()
        WinWaitActive() ;¥0µ 91\/3 еp3?
        Send()
        WinActivate()
        WinWaitActive()
        Send()
        Sleep()
        Send()
        Sleep()
        Send()
        WinActivate()
        WinWaitActive()
        Send()
        Send()
        Send()
        Send()
        A_Function_That_Waits_For_An_IE_Page_To_Finish_Loading()
        ControlClick() ;¥0µ 91\/3 еp3?
        Sleep()
        Send() ;¥0µ 91\/3 еp3?
        Send()
        Send() ;¥0µ 91\/3 еp3?
    ENDIF
ENDIF

;    !!!!!!@@@@@@((((((******HERE IS WHERE I NEED THE LOOP TO FINISH******))))))@@@@@@!!!!!!

EXIT

OMG THAT THING IS SO MESSY!

Link to comment
Share on other sites

Not a working example (obviously) but should give you the point.

IF $Dude_It's_Like_Totally_A_Variable = 37 THEN
   Run()
   MyFunction()
EndIf

Exit;End of _your_ code

Func MyFunction()
;    !!!!!!@@@@@@((((((******HERE IS WHERE I NEED THE LOOP TO START******))))))@@@@@@!!!!!!

   Opt();¥0µ 91\/3 еp3?
   WinActivate()
   WinWaitActive()

; ...snip...

       ControlClick();¥0µ 91\/3 еp3?
       Sleep()
       Send();¥0µ 91\/3 еp3?
       Send()
       Send();¥0µ 91\/3 еp3?
   ENDIF
ENDIF

;    !!!!!!@@@@@@((((((******HERE IS WHERE I NEED THE LOOP TO FINISH******))))))@@@@@@!!!!!!
EndFunc;End of script

After that you can call the same function several times in your programs, and create loops in this way:

Do
   MyFunction()
Until $my_stupid_var = something
Edited by erebus
Link to comment
Share on other sites

i think he wants to do 2 loops at the same time.

like this

while 1

do this stuff

wend

while 1

do that stuff

wend

well yeah, that would take another script to do it that way.

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

i think he wants to do 2 loops at the same time.

like this

while 1

do this stuff

wend

while 1

do that stuff

wend

well yeah, that would take another script to do it that way.

<{POST_SNAPBACK}>

I don't understand why people would want that.

You can execute multiple functions, commands in one loop.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...