Sign in to follow this  
Followers 0
StrictlyBallin24

Two Problems

12 posts in this topic

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?

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

You could look at this thread, several threads before yours.

open address in IE bar, better way?
As for your loop. Depends on your script setup.

Share this post


Link to post
Share on other sites

Lol, one line of code did the trick:

Opt("WinTitleMatchMode", 2)

And for the loop, I can't release my scripting so looks like I'll have to figure it out on my own.

Share this post


Link to post
Share on other sites

And for the loop, I can't release my scripting so looks like I'll have to figure it out on my own.

Try by giving us an altered example if your code is _that_ sensitive.

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

I sure hope you realize that all Variables and Functions given in that were totally edited for the purpose of posting it on here (those arent actually the names I gave them in my program). But yeah, so no1 knows?

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

What about?

While 1
  ;You nonsenses
Wend

Share this post


Link to post
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.

Share this post


Link to post
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.

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  
Followers 0