Sign in to follow this  
Followers 0
HHCory

Working with IE

27 posts in this topic

I am trying to go to a specific web page. the IE commands that i have seen are not working for me.


I am really starting to learn how to piece together the puzzle that is AutoIt. [u]ComboBox RadioButton Help.au3[/u]

Share this post


Link to post
Share on other sites



Have you included the IE.au3 library, and please post some code. Thanks.

Share this post


Link to post
Share on other sites

here is my coding for this. i had to change the link because it is a sensitve link.

I want to add a loop to where it will open the link and wait for a period of time then close it. and loop that.

#include <guiconstants.au3>
Dim $ItemIWantTrueToAct = 3
$MainGUI = GUICreate('MyGUI', 400, 300)
$Button = GUICtrlCreateButton('First Class Solitare', 100, 10, 150, 30)

GUISetState()
While 1
    $MainMsg = GUIGetMsg()
    Select
    Case $MainMsg = $GUI_EVENT_CLOSE
        Exit
   Case $MainMsg = $Button  
      Run("C:\Program Files\Mozilla Firefox\firefox.exe")
     WinWait('Mozilla')
      MouseClick("left", 245, 65, 5)
      send('http://www.pogo.com{ENTER}')
       Sleep(10000)
    EndSelect
WEnd

I am really starting to learn how to piece together the puzzle that is AutoIt. [u]ComboBox RadioButton Help.au3[/u]

Share this post


Link to post
Share on other sites

I just glanced at this... but just so you know... this won't work: send('http://www.pogo.com{ENTER}') when using a send and a enter you have to seperate the string send command from the enter command.

Send('Text' & '{ENTER}') as an example.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

I just glanced at this... but just so you know... this won't work: send('http://www.pogo.com{ENTER}') when using a send and a enter you have to seperate the string send command from the enter command.

Send('Text' & '{ENTER}') as an example.

um... NO? I mean... I believe you're :lmao: mistaken...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

um... NO? I mean... I believe you're :lmao: mistaken...

Yeh, I thought about it after I posted... just figured I'd leave my idiotic response up there!!


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Yeh, I thought about it after I posted... just figured I'd leave my idiotic response up there!!

Oh, so when people can talk about how you're never wrong, you can correct them? Good idea, but looking at your posts for the day, i'd say any one would be example enough... :lmao: Sorry, i don't mean to pick, you know i have nothing but respect for your abilities. You were kind of asking for it today though... sleepy bastard.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

I guess my code is working fine. all i need to add is a close window and loop to it now. and im not sure how to do that

Edited by HHCory

I am really starting to learn how to piece together the puzzle that is AutoIt. [u]ComboBox RadioButton Help.au3[/u]

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

here is my latest problem

Case $MainMsg = $Button2
            Run("C:\Program Files\Mozilla Firefox\firefox.exe")
            WinWait('Mozilla')
            MouseClick("left", 250, 90, 1)
            Send('http://www.pogo.com/room/connect.jsp?game=popfu&site=pogop&apid&auto=PlayNow{ENTER}')
            Do
            Sleep(3600000)
            MouseClick("left", 780, 100, 1)
            Send('{lctr}{lshift}R')
            Until('{ESCAPE}')

i want this to loop till the user presses the Esc key.

also i would like to add a place where the user could define the sleep time.

Edited by HHCory

I am really starting to learn how to piece together the puzzle that is AutoIt. [u]ComboBox RadioButton Help.au3[/u]

Share this post


Link to post
Share on other sites

here is my latest problem

Case $MainMsg = $Button2
            Run("C:\Program Files\Mozilla Firefox\firefox.exe")
            WinWait('Mozilla')
            MouseClick("left", 250, 90, 1)
            Send('http://www.pogo.com/room/connect.jsp?game=popfu&site=pogop&apid&auto=PlayNow{ENTER}')
            Do
            Sleep(3600000)
            MouseClick("left", 780, 100, 1)
            Send('{lctr}{lshift}R')
            Until('{ESCAPE}')

i want this to loop till the user presses the Esc key.

also i would like to add a place where the user could define the sleep time.

Hate to be a stick in the mud, and I'm not sure why no one has suggested this, but wouldn't this be easier?

Global $DumpOut = 0
; This mode is less prone to errors when screen resolution is different than what you use to determine coordinates - not important to this thread?
AutoItSetOption ( 'MouseCoordMode', 2 )
Run('"C:\Program Files\Mozilla Firefox\firefox.exe" http://www.pogo.com/room/connect.jsp?game=popfu&site=pogop&apid&auto=PlayNow' )
Do
  Sleep ( 250 )
Until WinExists ( 'Club Pogo' )
WinActivate ( 'Club Pogo' )
; Set Optios-->CoordMode-->Client in AutoIt Window Info to get coordinates
MouseClick ( 'left', 457, 492 ); This clicks the Sign In button on the page above for me
HotKeySet ( '{Esc}', "MyExitLoop" )
While 1
    MsgBox ( 0, @ScriptName, 'Now?' )
    If $DumpOut = 1 Then ExitLoop
WEnd
$DumpOut = 0    
Func MyExitLoop()
    $DumpOut = 1
EndFunc

Hope this helps.

Share this post


Link to post
Share on other sites

Do
  Sleep ( 250 )
Until WinExists ( 'Club Pogo' )

the only problem with this is that when the user signs in the name of the window changes to the user name.


I am really starting to learn how to piece together the puzzle that is AutoIt. [u]ComboBox RadioButton Help.au3[/u]

Share this post


Link to post
Share on other sites

maybe this could help

WinGetHandle

WinGetHandle

--------------------------------------------------------------------------------

Retrieves the internal handle of a window.

WinGetHandle ( "title" [, "text"] )

Parameters

title The title of the window to read. See Title special definition.

text [optional] The text of the window to read.

Return Value

Success: Returns handle to the window.

Failure: Returns "" (blank string) and sets @error to 1 if no window matches the criteria.

Remarks

This function is for use with the advanced WinTitleMatchMode options that allow you to use classnames and handles to specify windows rather than "title" and "text".

Once you have obtained the handle you can access the required window even if its title changes.

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Do
  Sleep ( 250 )
Until WinExists ( 'Club Pogo' )
WinActivate ( 'Club Pogo' )

this wont work in this situation. most users will already be signed in. once a user is signed in then the name of the window changes to the user name and the room information. Which will be different for every user/ loop.

Do
            Run('"C:\Program Files\Mozilla Firefox\firefox.exe" http://www.pogo.com/room/connect.jsp?game=popfu&site=pogop&apid&auto=PlayNow' )
            Sleep (30000)
            Until (Escape)
                         HotKeySet ( '{Esc}', "MyExitLoop" )

this would work for me better but i dont think this is the right code to exit loop


I am really starting to learn how to piece together the puzzle that is AutoIt. [u]ComboBox RadioButton Help.au3[/u]

Share this post


Link to post
Share on other sites

if you use "runWait" the script will pause untill the window-game is closed

just an idea

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

if you use runwait then what will close the window? Sorry to be such a NOOOOOB.

I under stand that runwait will pause the auto till the window is closed. what i need is something that will close the window in a user defined amount of time. then loop the whole prosses till the use hits Esc.


I am really starting to learn how to piece together the puzzle that is AutoIt. [u]ComboBox RadioButton Help.au3[/u]

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