bosko Posted July 4, 2005 Posted July 4, 2005 well heres the code expandcollapse popup;--------> EDIT URL HERE ---v $sURL = "http://www.neopets.com/explore.phtml" ;--------> EDIT URL HERE ---^ Opt("WinTitleMatchMode", 2) Global $pause = 0, $win = "- Microsoft Internet Explorer" $oIE = ObjCreate("InternetExplorer.Application") With $oIE .Navigate($sURL) While .ReadyState <> 4 Sleep(10) Wend Sleep(500) .Visible = 1 EndWith WinWaitActive($win, "") Sleep(300) WinSetState($win, "", @SW_MAXIMIZE) WinSetOnTop($win, "", 1) HotkeySet("{PAUSE}", "GoPause") HotkeySet("{ESC}", "myexit") While 1 If not WinActive($win, "") Then WinActivate($win, "") If not WinExists($win, "") Then Exit Send("{F5}") While $oIE.ReadyState <> 4 If not WinExists($win, "") Then Exit Sleep(10) Wend Wend Func GoPause() $pause = 1 HotkeySet("{PAUSE}", "UnPause") While $pause Sleep(10) Wend HotkeySet("{PAUSE}", "GoPause") EndFunc Func UnPause() $pause = 0 EndFunc Func myexit() WinKill($win, "") Exit EndFunc i tried gui create but all i got was an error mesage thats its not writen properly
GaryFrost Posted July 4, 2005 Posted July 4, 2005 expandcollapse popup#include <GuiConstants.au3> Opt ("WinTitleMatchMode", 2) Global $pause = 0, $win = "- Microsoft Internet Explorer", $oIE HotKeySet("{PAUSE}", "GoPause") HotKeySet("{ESC}", "myexit") GUICreate("MyGUI", 392, 322) $Input_URL = GUICtrlCreateInput("http://www.neopets.com/explore.phtml", 20, 40, 340, 20) $Btn_Navigate = GUICtrlCreateButton("Navigate",392/2 - 60,80,120,25) GuiCtrlSetOnEvent(-1,"_Navigate") GUISetState() _Navigate() AdlibEnable("_MyAdlib") While 1 Sleep(10) WEnd Exit Func _Navigate() $oIE = ObjCreate("InternetExplorer.Application") With $oIE .Navigate (GUICtrlRead($Input_URL)) While .ReadyState <> 4 Sleep(10) WEnd Sleep(500) .Visible = 1 EndWith WinWaitActive($win, "") Sleep(300) WinSetState($win, "", @SW_MAXIMIZE) WinSetOnTop($win, "", 1) EndFunc Func _MyAdlib() While 1 If Not WinActive($win, "") Then WinActivate($win, "") If Not WinExists($win, "") Then Exit Send("{F5}") While $oIE.ReadyState <> 4 If Not WinExists($win, "") Then Exit Sleep(10) WEnd WEnd EndFunc ;==>_MyAdlib Func GoPause() $pause = 1 HotKeySet("{PAUSE}", "UnPause") While $pause Sleep(10) WEnd HotKeySet("{PAUSE}", "GoPause") EndFunc ;==>GoPause Func UnPause() $pause = 0 EndFunc ;==>UnPause Func myexit() WinKill($win, "") Exit EndFunc ;==>myexit SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
bosko Posted July 11, 2005 Author Posted July 11, 2005 (edited) expandcollapse popup#include <GuiConstants.au3> Opt ("WinTitleMatchMode", 2) Global $pause = 0, $win = "- Microsoft Internet Explorer", $oIE HotKeySet("{PAUSE}", "GoPause") HotKeySet("{ESC}", "myexit") GUICreate("MyGUI", 392, 322) $Input_URL = GUICtrlCreateInput("http://www.neopets.com/explore.phtml", 20, 40, 340, 20) $Btn_Navigate = GUICtrlCreateButton("Navigate",392/2 - 60,80,120,25) GuiCtrlSetOnEvent(-1,"_Navigate") GUISetState() _Navigate() AdlibEnable("_MyAdlib") While 1 Sleep(10) WEnd Exit Func _Navigate() $oIE = ObjCreate("InternetExplorer.Application") With $oIE .Navigate (GUICtrlRead($Input_URL)) While .ReadyState <> 4 Sleep(10) WEnd Sleep(500) .Visible = 1 EndWith WinWaitActive($win, "") Sleep(300) WinSetState($win, "", @SW_MAXIMIZE) WinSetOnTop($win, "", 1) EndFunc Func _MyAdlib() While 1 If Not WinActive($win, "") Then WinActivate($win, "") If Not WinExists($win, "") Then Exit Send("{F5}") While $oIE.ReadyState <> 4 If Not WinExists($win, "") Then Exit Sleep(10) WEnd WEnd EndFunc ;==>_MyAdlib Func GoPause() $pause = 1 HotKeySet("{PAUSE}", "UnPause") While $pause Sleep(10) WEnd HotKeySet("{PAUSE}", "GoPause") EndFunc ;==>GoPause Func UnPause() $pause = 0 EndFunc ;==>UnPause Func myexit() WinKill($win, "") Exit EndFunc ;==>myexit<{POST_SNAPBACK}>thx for that but if i understand that it goes by x&y coordinates... but not all people have their mouse buttons the same so how would i make it so that it looks for the letters Go or a white arrowedit:expandcollapse popup#include <GuiConstants.au3> Opt ("WinTitleMatchMode", 2) Global $pause = 0, $win = "- Microsoft Internet Explorer", $oIE HotKeySet("{PAUSE}", "GoPause") HotKeySet("{ESC}", "myexit") GUICreate("MyGUI", 392, 322) $Input_URL = GUICtrlCreateInput("http://www.neopets.com/explore.phtml", 20, 40, 340, 20) $Btn_Navigate = GUICtrlCreateButton("Navigate",392/2 - 60,80,120,25) GUICtrlSetImage (-1, "GO.bmp",22) GUISetState() _Navigate() AdlibEnable("_MyAdlib") While 1 Sleep(10) WEnd Exit Func _Navigate() $oIE = ObjCreate("InternetExplorer.Application") With $oIE .Navigate (GUICtrlRead($Input_URL)) While .ReadyState <> 4 Sleep(10) WEnd Sleep(500) .Visible = 1 EndWith WinWaitActive($win, "") Sleep(300) WinSetState($win, "", @SW_MAXIMIZE) WinSetOnTop($win, "", 1) EndFunc Func _MyAdlib() While 1 If Not WinActive($win, "") Then WinActivate($win, "") If Not WinExists($win, "") Then Exit Send("{F5}") While $oIE.ReadyState <> 4 If Not WinExists($win, "") Then Exit Sleep(10) WEnd WEnd EndFunc ;==>_MyAdlib Func GoPause() $pause = 1 HotKeySet("{PAUSE}", "UnPause") While $pause Sleep(10) WEnd HotKeySet("{PAUSE}", "GoPause") EndFunc ;==>GoPause Func UnPause() $pause = 0 EndFunc ;==>UnPause Func myexit() WinKill($win, "") Exit EndFunc ;==>myexit EndWith WinWaitActive($win, "") Sleep(300) WinSetState($win, "", @SW_MAXIMIZE) WinSetOnTop($win, "", 1) EndFunc Func _MyAdlib() While 1 If Not WinActive($win, "") Then WinActivate($win, "") If Not WinExists($win, "") Then Exit Send("{F5}") While $oIE.ReadyState <> 4 If Not WinExists($win, "") Then Exit Sleep(10) WEnd WEnd EndFunc ;==>_MyAdlib Func GoPause() $pause = 1 HotKeySet("{PAUSE}", "UnPause") While $pause Sleep(10) WEnd HotKeySet("{PAUSE}", "GoPause") EndFunc ;==>GoPause Func UnPause() $pause = 0 EndFunc ;==>UnPause Func myexit() WinKill($win, "") Exit EndFunc ;==>myexitthats what i got when i edited it bu i get an error now that says "Eroor: "func" statement has no matching EndFunc". Edited July 11, 2005 by bosko
GaryFrost Posted July 11, 2005 Posted July 11, 2005 (edited) expandcollapse popup#include <GuiConstants.au3> Opt ("WinTitleMatchMode", 2) Global $pause = 0, $win = "- Microsoft Internet Explorer", $oIE HotKeySet("{PAUSE}", "GoPause") HotKeySet("{ESC}", "myexit") GUICreate("MyGUI", 392, 322) $Input_URL = GUICtrlCreateInput("http://www.neopets.com/explore.phtml", 20, 40, 340, 20) $Btn_Navigate = GUICtrlCreateButton("Navigate", 392 / 2 - 60, 80, 120, 25) GUICtrlSetImage(-1, "GO.bmp", 22) GUISetState() _Navigate() AdlibEnable("_MyAdlib") While 1 Sleep(10) WEnd Exit Func _Navigate() $oIE = ObjCreate("InternetExplorer.Application") With $oIE .Navigate (GUICtrlRead($Input_URL)) While .ReadyState <> 4 Sleep(10) WEnd Sleep(500) .Visible = 1 EndWith WinWaitActive($win, "") Sleep(300) WinSetState($win, "", @SW_MAXIMIZE) WinSetOnTop($win, "", 1) EndFunc ;==>_Navigate Func _MyAdlib() While 1 If Not WinActive($win, "") Then WinActivate($win, "") If Not WinExists($win, "") Then Exit Send("{F5}") While $oIE.ReadyState <> 4 If Not WinExists($win, "") Then Exit Sleep(10) WEnd WEnd EndFunc ;==>_MyAdlib Func GoPause() $pause = 1 HotKeySet("{PAUSE}", "UnPause") While $pause Sleep(10) WEnd HotKeySet("{PAUSE}", "GoPause") EndFunc ;==>GoPause Func UnPause() $pause = 0 EndFunc ;==>UnPause ;Func myexit() ; WinKill($win, "") ; Exit ;EndFunc ;==>myexit ;### Tidy Error: next line creates a negative tablevel. ;### Tidy Error: next line creates a negative tablevel for the line after it. ;EndWith ; ;WinWaitActive($win, "") ;Sleep(300) ;WinSetState($win, "", @SW_MAXIMIZE) ;WinSetOnTop($win, "", 1) ;### Tidy Error: next line creates a negative tablevel. ;### Tidy Error: next line creates a negative tablevel for the line after it. ;EndFunc ;==>myexit Func _MyAdlib() While 1 If Not WinActive($win, "") Then WinActivate($win, "") If Not WinExists($win, "") Then Exit Send("{F5}") While $oIE.ReadyState <> 4 If Not WinExists($win, "") Then Exit Sleep(10) WEnd WEnd EndFunc ;==>_MyAdlib Func GoPause() $pause = 1 HotKeySet("{PAUSE}", "UnPause") While $pause Sleep(10) WEnd HotKeySet("{PAUSE}", "GoPause") EndFunc ;==>GoPause Func UnPause() $pause = 0 EndFunc ;==>UnPause Func myexit() WinKill($win, "") Exit EndFunc ;==>myexit Edited July 11, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
bosko Posted July 13, 2005 Author Posted July 13, 2005 Error reading: GUIConstants.au3 ... are you using beta?
GaryFrost Posted July 13, 2005 Posted July 13, 2005 nope SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
GaryFrost Posted July 13, 2005 Posted July 13, 2005 Here's an example straight out of the help file for 3.1.1 release version #include <GUIConstants.au3> GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUISetState (@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
bosko Posted July 13, 2005 Author Posted July 13, 2005 Here's an example straight out of the help file for 3.1.1 release version#include <GUIConstants.au3> GUICreate("My GUI"); will create a dialog box that when displayed is centered GUISetState (@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend<{POST_SNAPBACK}>i was using a diff version that was the problem but i got another error when i used 3.1.1Func_Myadlib()Error: Duplicate function name.
GaryFrost Posted July 13, 2005 Posted July 13, 2005 expandcollapse popup#include <GuiConstants.au3> Opt ("WinTitleMatchMode", 2) Global $pause = 0, $win = "- Microsoft Internet Explorer", $oIE HotKeySet("{PAUSE}", "GoPause") HotKeySet("{ESC}", "myexit") GUICreate("MyGUI", 392, 322) $Input_URL = GUICtrlCreateInput("http://www.neopets.com/explore.phtml", 20, 40, 340, 20) $Btn_Navigate = GUICtrlCreateButton("Navigate", 392 / 2 - 60, 80, 120, 25) GUICtrlSetImage(-1, "GO.bmp", 22) GUISetState() _Navigate() AdlibEnable("_MyAdlib") While 1 Sleep(10) WEnd Exit Func _Navigate() $oIE = ObjCreate("InternetExplorer.Application") With $oIE .Navigate (GUICtrlRead($Input_URL)) While .ReadyState <> 4 Sleep(10) WEnd Sleep(500) .Visible = 1 EndWith WinWaitActive($win, "") Sleep(300) WinSetState($win, "", @SW_MAXIMIZE) WinSetOnTop($win, "", 1) EndFunc ;==>_Navigate Func _MyAdlib() While 1 If Not WinActive($win, "") Then WinActivate($win, "") If Not WinExists($win, "") Then Exit Send("{F5}") While $oIE.ReadyState <> 4 If Not WinExists($win, "") Then Exit Sleep(10) WEnd WEnd EndFunc ;==>_MyAdlib Func GoPause() $pause = 1 HotKeySet("{PAUSE}", "UnPause") While $pause Sleep(10) WEnd HotKeySet("{PAUSE}", "GoPause") EndFunc ;==>GoPause Func UnPause() $pause = 0 EndFunc ;==>UnPause Func myexit() WinKill($win, "") Exit EndFunc ;==>myexit SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
bosko Posted July 14, 2005 Author Posted July 14, 2005 $oIE = ObjCreate("InternetExplorer.Application") $oIE = ^ERROR Error: Unknown function name.
Developers Jos Posted July 14, 2005 Developers Posted July 14, 2005 $oIE = ObjCreate("InternetExplorer.Application")$oIE = ^ERRORError: Unknown function name.<{POST_SNAPBACK}>You need the AutoIt3 Beta version for this command.... 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.
bosko Posted July 14, 2005 Author Posted July 14, 2005 with beta i get this error $Input_URL = GUICtrlCreateInput("http://www.neopets.com/explore.phtml", 20, 40, $Input_URL = GUICtrlCreateInput("http://www.neopets.com/explore.phtml", 20, 40^ ERROR Error parsing function call.
Developers Jos Posted July 14, 2005 Developers Posted July 14, 2005 with beta i get this error$Input_URL = GUICtrlCreateInput("http://www.neopets.com/explore.phtml", 20, 40,$Input_URL = GUICtrlCreateInput("http://www.neopets.com/explore.phtml", 20, 40^ERRORError parsing function call.<{POST_SNAPBACK}>ofcourse you had a look at the syntax and found that there are probably some crlf's that souldn't be there and that the line should say:$Input_URL = GUICtrlCreateInput("http://www.neopets.com/explore.phtml", 20, 40,340, 20)Right ?? 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.
bosko Posted July 14, 2005 Author Posted July 14, 2005 (edited) ofcourse you had a look at the syntax and found that there are probably some crlf's that souldn't be there and that the line should say:$Input_URL = GUICtrlCreateInput("http://www.neopets.com/explore.phtml", 20, 40,340, 20)Right ?? <{POST_SNAPBACK}>I LOVE YOU AND GAFROSTbut yeah i always miss them sons of a b*****it doesnt navigate to different pages... is there any way i could just make a browser...... Edited July 15, 2005 by bosko
buzz44 Posted July 15, 2005 Posted July 15, 2005 (edited) So young... look at the example in the help file for GUICtrlCreateObj(). Edited July 15, 2005 by Burrup qq
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now