Jump to content

Working with IE


 Share

Recommended Posts

NOT TESTED... but an idea

#include <guiconstants.au3>
Global $DumpOut = 0
HotKeySet ( '{Esc}', "MyExitLoop" )

$MainGUI = GUICreate('MyGUI', 400, 300)
GUICtrlCreateLabel ("How many minutes would you like to play?", 20, 50, 250, 20)
$input = GUICtrlCreateInput("", 150, 100, 30, 20, $ES_NUMBER)
GUICtrlSetLimit( -1, 3, 1 )
$Button2 = GUICtrlCreateButton('First Class Solitare', 120, 200, 150, 30)

GUISetState()
While 1
    $MainMsg = GUIGetMsg()
    Select
    Case $MainMsg = $GUI_EVENT_CLOSE
        Exit
    Case $MainMsg = $Button2
            $pid = 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((GUICtrlRead($input)) * 60 * 1000)
            MouseClick("left", 780, 100, 1)
            Send('{lctr}{lshift}R')
            Until $DumpOut = 1
    EndSelect
WEnd

; ------------- Functions ----------------------

Func MyExitLoop()
    $DumpOut = 1
EndFunc

8)

NEWHeader1.png

Link to comment
Share on other sites

; just before the while loop in your script

opt("TrayMenuMode", 1)

opt("TrayOnEventMode", 1)

$show_tray = TrayCreateItem("About this Program")

TrayItemSetOnEvent(-1, "Set_Show")

TrayCreateItem("")

$exit_tray = TrayCreateItem("Exit this Program")

TrayItemSetOnEvent(-1, "Set_Exit")

TraySetState()

;at the bottom of your script

Func Set_Exit()

Exit

EndFunc

Func Set_Show()

MsgBox(64, " About this Program"," this Program was designed by............ me!!! ")

EndFunc

8)

NEWHeader1.png

Link to comment
Share on other sites

so here is my full script it works now I have not gotten all the IE links set yet. it will take me some more time. I think that now the only problem that i am having is that I can not click on the entry box at the bottom. i have to tab down to it. thanks for all the help that i have gotten here. i hope that i can continue to learn this great program.

Pogo_Rover.au3

Edited by HHCory
I am really starting to learn how to piece together the puzzle that is AutoIt. [u]ComboBox RadioButton Help.au3[/u]
Link to comment
Share on other sites

after testing this for a while i have found that this script is very bulky. I have made changes and got rid of all the buttons and changed them to a combo box. my probem is i cant get it to select the different functions. I still cant figure out how to move the curser to the input box by clicking on it.

I would also like to add to where when the function is started it the GUI minimizes to the system tray.

I will attach the file as well

#include <GuiConstants.au3>

; GUI
GuiCreate("Pogo Rover", 190, 80,(@DesktopWidth-191)/2, (@DesktopHeight-157)/2)
GUISetState()
opt("TrayMenuMode", 1)
opt("TrayOnEventMode", 1)

$show_tray = TrayCreateItem("About this Program")
TrayItemSetOnEvent(-1, "Set_Show")
TrayCreateItem("")
$exit_tray = TrayCreateItem("Exit this Program")
TrayItemSetOnEvent(-1, "Set_Exit")
TraySetState()

GUICtrlCreateLabel ("Select amount of time then select game", 2, 10, 250, 20)
$Combo_1 = GuiCtrlCreateCombo("Select Game", 20, 30, 150, 21)
GuiCtrlSetData($combo_1, "|3-Point Showdown|Aces Up|Ali Baba Slots|Backgammon|Battle Phlinx|Buckaroo Blackjack|Canasta|Casino Island Blackjack|Checkers|Dice Derby|Dominoes|Double Duce Poker|Euchre|Fortune Bingo|Greenback Bayoe|Harvest Maina|Hearts|Jacks or Better |Jigsaw Detective|Jokers Wild|Jungle Gin|Lottso!|Mahjong Garden|Panda Pai Gow Poker|Payday Freecell|Penguin Blocs|Perfect Pair Solitaire|Phlinx|Pinochle|PopFu|PoppaZappa||Poppit!|Quick Quack|QWERTY|Rainy Day Spider|Sci-Fi Slots|Showbiz Slots|Squelchies|Stack'em|Stellar Sweeper|Texas Hold'em|Tri-Peaks|Vaults of Atlantis Slots|Word Whomp|Word Whomp Whackdown|WordJong|World Class Solitaire|First Class Solitare|Ride The Tide")
GUICtrlCreateLabel ("Minutes to play?", 25, 60, 250, 20)
$input = GUICtrlCreateInput("60", 125, 58, 30, 17, $ES_NUMBER)

While 1
    $MainMsg = GUIGetMsg()
    Select
    Case $MainMsg = $GUI_EVENT_CLOSE
        Exit
    Case $MainMsg = $Combo_1;Mozilla 3-Point Shootout
            Do
            Run('"C:\Program Files\Mozilla Firefox\firefox.exe" http://www.pogo.com/room/connect.jsp?game=threepoint&site=pogop&apid&auto=PlayNow')
            Sleep((GUICtrlRead($input)) * 60 * 1000)
        Until $DumpOut = 1
    Case $MainMsg = $Combo_1;6th Street Omaha Poker
            Do
            Run('"C:\Program Files\Mozilla Firefox\firefox.exe" http://www.pogo.com/room/connect.jsp?game=omaha&site=pogop&apid&auto=PlayNow')
            Sleep((GUICtrlRead($input)) * 60 * 1000)
            Until $DumpOut = 1
    Case $MainMsg = $Combo_1;Mozilla Aces Up
            Do
            Run('"C:\Program Files\Mozilla Firefox\firefox.exe" http://www.pogo.com/room/connect.jsp?game=aces&site=pogop&apid&auto=PlayNow')
            Sleep((GUICtrlRead($input)) * 60 * 1000)
            Until $DumpOut = 1
    Case $MainMsg = $Combo_1;Ali Baba Slots
            Do
            Run('"C:\Program Files\Mozilla Firefox\firefox.exe" http://www.pogo.com/room/connect.jsp?game=slots&site=pogop&apid&auto=PlayNow')
            Sleep((GUICtrlRead($input)) * 60 * 1000)
            Until $DumpOut = 1  
EndSelect
WEnd        
        




;------------- Functions ----------------------

Func MyExitLoop()
    $DumpOut = 1
EndFunc
Func Set_Exit()
Exit
EndFunc

Func Set_Show()
MsgBox(64, " About this Program"," this Program was designed by HHCORY!!!  Version1.0 ")
EndFunc 
; GUI MESSAGE LOOP
GuiSetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
WEnd
Edited by HHCory
I am really starting to learn how to piece together the puzzle that is AutoIt. [u]ComboBox RadioButton Help.au3[/u]
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...