Cha0sBG Posted May 17, 2008 Posted May 17, 2008 i only need help with my func Func RUNNER() Local $PATHES, $ALL, $1, $2, $3, $5, $6, $7, $8 While 1 If $MSG = $START Then $PATHES = GUICtrlRead($DIRECTORY) $ALL = GUICtrlRead Bitand($1, $2, $3, $5, $6, $7, $8) GUICtrlCreateProgress(0, 0) Progresson("Login Progress", "Loading The Steps", "1st Step", $PSB_SMOOTH) For $I = $ALL ProgressOff() $1 = ShellExecute("Silkroad.exe", "", $PATHES, "") Sleep(1000) $2 = PROS() Sleep(1) $3 = MouseClick("", 771, 517) Sleep(22000) $4 = Send("{SPACE}") sleep(250) Local $IDRED $IDRED = GUICtrlRead($IDENTER) $5 = Send($IDRED) $6 = Send("{TAB}") Local $PWRED $PWRED = GUICtrlRead($PWENTER) $7 = Send($PWRED) Sleep(250) FileInstall("Enter.exe", "Enter.exe") $8 = ShellExecute("Enter.exe", "", @ScriptDir) ExitLoop EndIf WEnd EndFunc Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread.
Muchuchu Posted May 17, 2008 Posted May 17, 2008 (edited) Tell me if this works Local $PATHES, $ALL, $1, $2, $3, $5, $6, $7, $8 While 1 If $MSG = $START Then $PATHES = GUICtrlRead($DIRECTORY) $ALL = GUICtrlRead Bitand($1, $2, $3, $5, $6, $7, $8) GUICtrlCreateProgress(0, 0) Progresson("Login Progress", "Loading The Steps", "1st Step", $PSB_SMOOTH) For $I = $ALL ProgressOff() $1 = ShellExecute("Silkroad.exe", "", $PATHES, "") Sleep(1000) $2 = PROS() Sleep(1) $3 = MouseClick("", 771, 517) Sleep(22000) $4 = Send("{SPACE}") sleep(250) Local $IDRED $IDRED = GUICtrlRead($IDENTER) $5 = Send($IDRED) $6 = Send("{TAB}") Local $PWRED $PWRED = GUICtrlRead($PWENTER) $7 = Send($PWRED) Sleep(250) FileInstall("Enter.exe", "Enter.exe") $8 = ShellExecute("Enter.exe", "", @ScriptDir) next ExitLoop EndIf WEnd Edited May 17, 2008 by Muchuchu
Cha0sBG Posted May 17, 2008 Author Posted May 17, 2008 No Its Not Working Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread.
Muchuchu Posted May 17, 2008 Posted May 17, 2008 Well unless we can see the rest of your script or at least the parts that go with it, then it's sort of difficult to help. Also what error were you getting?
=sinister= Posted May 17, 2008 Posted May 17, 2008 Func RUNNER() Local $PATHES, $ALL, $1, $2, $3, $5, $6, $7, $8 While 1 If $MSG = $START Then $PATHES = GUICtrlRead($DIRECTORY) $ALL = GUICtrlRead Bitand($1, $2, $3, $5, $6, $7, $8) GUICtrlCreateProgress(0, 0) Progresson("Login Progress", "Loading The Steps", "1st Step", $PSB_SMOOTH) For $I = $ALL ProgressOff() $1 = ShellExecute("Silkroad.exe", "", $PATHES, "") Sleep(1000) $2 = PROS() Sleep(1) $3 = MouseClick("", 771, 517) Sleep(22000) $4 = Send("{SPACE}") sleep(250) Local $IDRED $IDRED = GUICtrlRead($IDENTER) $5 = Send($IDRED) $6 = Send("{TAB}") Local $PWRED $PWRED = GUICtrlRead($PWENTER) $7 = Send($PWRED) Sleep(250) FileInstall("Enter.exe", "Enter.exe") $8 = ShellExecute("Enter.exe", "", @ScriptDir) ExitLoop EndIf WEnd EndFunc Runner() ?
sandin Posted May 17, 2008 Posted May 17, 2008 (edited) is $START a button? if it is, shouldn't you use $MSG = GUIGetMsg() before If $MSG = $START Then? And use Opt("TrayIconDebug", 1) at the top of the script to see where your script is failing... edit: P.S. if you have "For", you must have "next" somewhere, like in Muchuchu's example, but your "for" is not correct either, you must have "for ... to ... step ... next", or "for ... in ... next" Edited May 17, 2008 by sandin Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
Paulie Posted May 17, 2008 Posted May 17, 2008 Whats with People and their Crazy "GuiCtrlRead BitAnd()" functions And why are we using GuiCtrlCreateProgress() and ProgressOn() And For...Next Loops with No upper limit (For $I =$ALL) Not to mention 1ms Sleeps Whats wrong with this code? How about everything?
sandin Posted May 17, 2008 Posted May 17, 2008 Whats with People and their Crazy "GuiCtrlRead BitAnd()" functionsLOL!! Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
Muchuchu Posted May 17, 2008 Posted May 17, 2008 Whats with People and their Crazy "GuiCtrlRead BitAnd()" functionsAnd why are we using GuiCtrlCreateProgress() and ProgressOn()And For...Next Loops with No upper limit (For $I =$ALL)Not to mention 1ms SleepsWhats wrong with this code? How about everything?I can't get enough of this post.
Cha0sBG Posted May 18, 2008 Author Posted May 18, 2008 (edited) Whats with People and their Crazy "GuiCtrlRead BitAnd()" functionsAnd why are we using GuiCtrlCreateProgress() and ProgressOn()And For...Next Loops with No upper limit (For $I =$ALL)Not to mention 1ms SleepsWhats wrong with this code? How about everything?i tryed all damn shit to make it work and that was my last try so if u can't help don't speak this is help section right ? not to make othere ppl feel lame like u did with meAnd Btw Te Othere Scipts That u dudes posted didn't work i allredy tryed like that ... Edited May 18, 2008 by Cha0sBG Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread.
Paulie Posted May 18, 2008 Posted May 18, 2008 (edited) i tryed all damn shit to make it work and that was my last try so if u can't help don't speak this is help section right ? not to make othere ppl feel lame like u did with meAnd Btw Te Othere Scipts That u dudes posted didn't work i allredy tryed like that ...Hey, hey, take a breather, I didn't mean to offend you. I mean nothing personal against you. Everybody makes mistakes, and there is nothing wrong with that.I know that other people posted code that was broken. To be honest, that is what i was laughing at more than anything; 4 people consecutively posting code with "GuiCtrlRead BitAnd()"I would be happy to help you fix your code, the only problem is that the sample you provided wasn't...well... functional enough to demonstrate what it was you wanted your script to do.If you were to provide a little more info.... Edited May 18, 2008 by Paulie
Cha0sBG Posted May 18, 2008 Author Posted May 18, 2008 (edited) Hey, hey, take a breather, I didn't mean to offend you. I mean nothing personal against you. Everybody makes mistakes, and there is nothing wrong with that. I know that other people posted code that was broken. To be honest, that is what i was laughing at more than anything; 4 people consecutively posting code with "GuiCtrlRead BitAnd()" I would be happy to help you fix your code, the only problem is that the sample you provided wasn't...well... functional enough to demonstrate what it was you wanted your script to do. If you were to provide a little more info.... sry it has global consts but 1st time i deleated the source and i had to decompile my exe btw here the codes are .......... don't tell me i know i'm lame >.< expandcollapse popupGlobal Const $ES_LEFT = 0 Global Const $ES_CENTER = 1 Global Const $ES_RIGHT = 2 Global Const $ES_MULTILINE = 4 Global Const $ES_UPPERCASE = 8 Global Const $ES_LOWERCASE = 16 Global Const $ES_PASSWORD = 32 Global Const $ES_AUTOVSCROLL = 64 Global Const $ES_AUTOHSCROLL = 128 Global Const $ES_NOHIDESEL = 256 Global Const $ES_OEMCONVERT = 1024 Global Const $ES_READONLY = 2048 Global Const $ES_WANTRETURN = 4096 Global Const $ES_NUMBER = 8192 Global Const $EC_ERR = -1 Global Const $ECM_FIRST = 5376 Global Const $EM_CANUNDO = 198 Global Const $EM_CHARFROMPOS = 215 Global Const $EM_EMPTYUNDOBUFFER = 205 Global Const $EM_FMTLINES = 200 Global Const $EM_GETCUEBANNER = ($ECM_FIRST + 2) Global Const $EM_GETFIRSTVISIBLELINE = 206 Global Const $EM_GETHANDLE = 189 Global Const $EM_GETIMESTATUS = 217 Global Const $EM_GETLIMITTEXT = 213 Global Const $EM_GETLINE = 196 Global Const $EM_GETLINECOUNT = 186 Global Const $EM_GETMARGINS = 212 Global Const $EM_GETMODIFY = 184 Global Const $EM_GETPASSWORDCHAR = 210 Global Const $EM_GETRECT = 178 Global Const $EM_GETSEL = 176 Global Const $EM_GETTHUMB = 190 Global Const $EM_GETWORDBREAKPROC = 209 Global Const $EM_HIDEBALLOONTIP = ($ECM_FIRST + 4) Global Const $EM_LIMITTEXT = 197 Global Const $EM_LINEFROMCHAR = 201 Global Const $EM_LINEINDEX = 187 Global Const $EM_LINELENGTH = 193 Global Const $EM_LINESCROLL = 182 Global Const $EM_POSFROMCHAR = 214 Global Const $EM_REPLACESEL = 194 Global Const $EM_SCROLL = 181 Global Const $EM_SCROLLCARET = 183 Global Const $EM_SETCUEBANNER = ($ECM_FIRST + 1) Global Const $EM_SETHANDLE = 188 Global Const $EM_SETIMESTATUS = 216 Global Const $EM_SETLIMITTEXT = $EM_LIMITTEXT Global Const $EM_SETMARGINS = 211 Global Const $EM_SETMODIFY = 185 Global Const $EM_SETPASSWORDCHAR = 204 Global Const $EM_SETREADONLY = 207 Global Const $EM_SETRECT = 179 Global Const $EM_SETRECTNP = 180 Global Const $EM_SETSEL = 177 Global Const $EM_SETTABSTOPS = 203 Global Const $EM_SETWORDBREAKPROC = 208 Global Const $EM_SHOWBALLOONTIP = ($ECM_FIRST + 3) Global Const $EM_UNDO = 199 Global Const $EC_LEFTMARGIN = 1 Global Const $EC_RIGHTMARGIN = 2 Global Const $EC_USEFONTINFO = 65535 Global Const $EMSIS_COMPOSITIONSTRING = 1 Global Const $EIMES_GETCOMPSTRATONCE = 1 Global Const $EIMES_CANCELCOMPSTRINFOCUS = 2 Global Const $EIMES_COMPLETECOMPSTRKILLFOCUS = 4 Global Const $EN_ALIGN_LTR_EC = 1792 Global Const $EN_ALIGN_RTL_EC = 1793 Global Const $EN_CHANGE = 768 Global Const $EN_ERRSPACE = 1280 Global Const $EN_HSCROLL = 1537 Global Const $EN_KILLFOCUS = 512 Global Const $EN_MAXTEXT = 1281 Global Const $EN_SETFOCUS = 256 Global Const $EN_UPDATE = 1024 Global Const $EN_VSCROLL = 1538 Global Const $TTI_NONE = 0 Global Const $TTI_INFO = 1 Global Const $TTI_WARNING = 2 Global Const $TTI_ERROR = 3 Global Const $TTI_INFO_LARGE = 4 Global Const $TTI_WARNING_LARGE = 5 Global Const $TTI_ERROR_LARGE = 6 Global Const $__EDITCONSTANT_WS_VSCROLL = 2097152 Global Const $__EDITCONSTANT_WS_HSCROLL = 1048576 Global Const $GUI_SS_DEFAULT_EDIT = BitOR($ES_WANTRETURN, $__EDITCONSTANT_WS_VSCROLL, $__EDITCONSTANT_WS_HSCROLL, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL) Global Const $GUI_SS_DEFAULT_INPUT = BitOR($ES_LEFT, $ES_AUTOHSCROLL) Global Const $GUI_EVENT_CLOSE = -3 Global Const $GUI_EVENT_MINIMIZE = -4 Global Const $GUI_EVENT_RESTORE = -5 Global Const $GUI_EVENT_MAXIMIZE = -6 Global Const $GUI_EVENT_PRIMARYDOWN = -7 Global Const $GUI_EVENT_PRIMARYUP = -8 Global Const $GUI_EVENT_SECONDARYDOWN = -9 Global Const $GUI_EVENT_SECONDARYUP = -10 Global Const $GUI_EVENT_MOUSEMOVE = -11 Global Const $GUI_EVENT_RESIZED = -12 Global Const $GUI_EVENT_DROPPED = -13 Global Const $GUI_RUNDEFMSG = "GUI_RUNDEFMSG" Global Const $GUI_AVISTOP = 0 Global Const $GUI_AVISTART = 1 Global Const $GUI_AVICLOSE = 2 Global Const $GUI_CHECKED = 1 Global Const $GUI_INDETERMINATE = 2 Global Const $GUI_UNCHECKED = 4 Global Const $GUI_DROPACCEPTED = 8 Global Const $GUI_NODROPACCEPTED = 4096 Global Const $GUI_ACCEPTFILES = $GUI_DROPACCEPTED Global Const $GUI_SHOW = 16 Global Const $GUI_HIDE = 32 Global Const $GUI_ENABLE = 64 Global Const $GUI_DISABLE = 128 Global Const $GUI_FOCUS = 256 Global Const $GUI_NOFOCUS = 8192 Global Const $GUI_DEFBUTTON = 512 Global Const $GUI_EXPAND = 1024 Global Const $GUI_ONTOP = 2048 Global Const $GUI_FONTITALIC = 2 Global Const $GUI_FONTUNDER = 4 Global Const $GUI_FONTSTRIKE = 8 Global Const $GUI_DOCKAUTO = 1 Global Const $GUI_DOCKLEFT = 2 Global Const $GUI_DOCKRIGHT = 4 Global Const $GUI_DOCKHCENTER = 8 Global Const $GUI_DOCKTOP = 32 Global Const $GUI_DOCKBOTTOM = 64 Global Const $GUI_DOCKVCENTER = 128 Global Const $GUI_DOCKWIDTH = 256 Global Const $GUI_DOCKHEIGHT = 512 Global Const $GUI_DOCKSIZE = 768 Global Const $GUI_DOCKMENUBAR = 544 Global Const $GUI_DOCKSTATEBAR = 576 Global Const $GUI_DOCKALL = 802 Global Const $GUI_DOCKBORDERS = 102 Global Const $GUI_GR_CLOSE = 1 Global Const $GUI_GR_LINE = 2 Global Const $GUI_GR_BEZIER = 4 Global Const $GUI_GR_MOVE = 6 Global Const $GUI_GR_COLOR = 8 Global Const $GUI_GR_RECT = 10 Global Const $GUI_GR_ELLIPSE = 12 Global Const $GUI_GR_PIE = 14 Global Const $GUI_GR_DOT = 16 Global Const $GUI_GR_PIXEL = 18 Global Const $GUI_GR_HINT = 20 Global Const $GUI_GR_REFRESH = 22 Global Const $GUI_GR_PENSIZE = 24 Global Const $GUI_GR_NOBKCOLOR = -2 Global Const $GUI_BKCOLOR_DEFAULT = -1 Global Const $GUI_BKCOLOR_TRANSPARENT = -2 Global Const $GUI_BKCOLOR_LV_ALTERNATE = -33554432 Global Const $GUI_WS_EX_PARENTDRAG = 1048576 Global $PAUSED, $RUNNER = False HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "Runner") Dim $CSVFILE = @ScriptDir & "\Data\Path.ini" $MAIN = GUICreate("Autologin", 200, 200) GUICtrlCreateTab(0, 0, 200, 200) $MAINTAB = GUICtrlCreateTabItem("Main") $START = GUICtrlCreateButton("Start", 55, 160, 80) $DIRECTORY = GUICtrlCreateInput("Select Your Silkroad Directory", 10, 25, 175) $BROWSE = GUICtrlCreateButton("Browse", 9, 50, 80, 20) $SAVE = GUICtrlCreateButton("Save", 106, 50, 80, 20) $ID = GUICtrlCreateLabel("ID", 5, 80) $PW = GUICtrlCreateLabel("PW", 2, 105) $IDENTER = GUICtrlCreateInput("", 20, 75, 150, 20) GUICtrlSetBkColor($IDENTER, 0) GUICtrlSetColor($IDENTER, 16777215) $PWENTER = GUICtrlCreateInput("", 20, 100, 150, 20, $ES_PASSWORD) GUICtrlSetBkColor($PWENTER, 0) GUICtrlSetColor($PWENTER, 16777215) $INIREAD = IniRead($CSVFILE, "SilkroadSettings", "SilkroadPath", "Please Enter Your Silkroad Path") $DIZINAYAR = GUICtrlSetData($DIRECTORY, $INIREAD) GUICtrlCreateTab(0, 0, 295, 170) $2NDTAB = GUICtrlCreateTabItem("Options") GUISetState() While 1 $MSG = GUIGetMsg() If $MSG = $BROWSE Then $SROPATHCHANGE = FileSelectFolder("Select Silkroad Directory", "") GUICtrlSetData($DIRECTORY, $SROPATHCHANGE & "\") EndIf If $MSG = $SAVE Then $INIWRITE = GUICtrlRead($DIRECTORY) IniWrite($CSVFILE, "SilkroadSettings", "SilkroadPath", $INIWRITE) EndIf If $MSG = -3 Then Exit If $MSG = $START Then RUNNER() WEnd Func DCCOC() While 1 If PixelGetColor(361, 315) = 13027014 Then Sleep(250) ProcessClose("SRO_Client.exe") RUNNER() ExitLoop EndIf WEnd EndFunc Func TOGGLEPAUSE() $PAUSED = Not $PAUSED While $PAUSED Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc Func TERMINATE() Exit 0 EndFunc Func PROS() GUICtrlCreateProgress(10, 10, 200, 20) ProgressOn("Easy Login", "Loading Please Wait", "0 percent") For $I = 10 To 100 Step 10 Sleep(500) ProgressSet($I, $I & " percent") Next ProgressSet(100, "Done", "Complete") Sleep(500) ProgressOff() EndFunc Func RUNNER() Local $PATHES, $ALL, $1, $2, $3, $5, $6, $7, $8 While 1 If $MSG = $START Then $PATHES = GUICtrlRead($DIRECTORY) $ALL = GUICtrlRead Bitand($1, $2, $3, $5, $6, $7, $8) GUICtrlCreateProgress(0, 0) Progresson("Login Progress", "Loading The Steps", "1st Step", $PSB_SMOOTH) For $I = $ALL ProgressOff() $1 = ShellExecute("Silkroad.exe", "", $PATHES, "") Sleep(1000) $2 = PROS() Sleep(1) $3 = MouseClick("", 771, 517) Sleep(22000) $4 = Send("{SPACE}") sleep(250) Local $IDRED $IDRED = GUICtrlRead($IDENTER) $5 = Send($IDRED) $6 = Send("{TAB}") Local $PWRED $PWRED = GUICtrlRead($PWENTER) $7 = Send($PWRED) Sleep(250) FileInstall("Enter.exe", "Enter.exe") $8 = ShellExecute("Enter.exe", "", @ScriptDir) ExitLoop EndIf WEnd EndFunc Edited May 18, 2008 by Cha0sBG Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread.
crashdemons Posted May 18, 2008 Posted May 18, 2008 Please explain what you want the function to do before asking to help make it work. My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)
Cha0sBG Posted May 18, 2008 Author Posted May 18, 2008 well to make a progressbar to show when Func Runner is started and to end when It's ended that's all >.< and btw hi DeSwa check your MSG on project has if u still are looking at this thread Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread.
Paulie Posted May 18, 2008 Posted May 18, 2008 well to make a progressbar to show when Func Runner is started and to end when It's ended that's all >.< and btw hi DeSwa check your MSG on project has if u still are looking at this threadOk, i guessed.... here is my metaphorical stab in the dark... expandcollapse popup#Include <GuiConstants.au3> HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "Runner") Global $PAUSED, $RUNNER = False Dim $CSVFILE = @ScriptDir & "\Data\Path.ini" $MAIN = GUICreate("Autologin", 200, 200) GUICtrlCreateTab(0, 0, 200, 200) $MAINTAB = GUICtrlCreateTabItem("Main") $START = GUICtrlCreateButton("Start", 55, 160, 80) $DIRECTORY = GUICtrlCreateInput("Select Your Silkroad Directory", 10, 25, 175) $BROWSE = GUICtrlCreateButton("Browse", 9, 50, 80, 20) $SAVE = GUICtrlCreateButton("Save", 106, 50, 80, 20) GUICtrlCreateLabel("ID", 5, 80) GUICtrlCreateLabel("PW", 2, 105) $IDENTER = GUICtrlCreateInput("", 20, 75, 150, 20) GUICtrlSetBkColor(-1, 0) GUICtrlSetColor(-1, 16777215) $PWENTER = GUICtrlCreateInput("", 20, 100, 150, 20, 32) GUICtrlSetBkColor(-1, 0) GUICtrlSetColor(-1, 16777215) If FileExists($CSVFILE) then $INIREAD = IniRead($CSVFILE, "SilkroadSettings", "SilkroadPath", "Please Enter Your Silkroad Path") GUICtrlSetData($DIRECTORY, $INIREAD) EndIf GUICtrlCreateTab(0, 0, 295, 170) $2NDTAB = GUICtrlCreateTabItem("Options") GUISetState() While 1 $MSG = GUIGetMsg() If $MSG = $BROWSE Then $SROPATHCHANGE = FileSelectFolder("Select Silkroad Directory", @ProgramFilesDir) GUICtrlSetData($DIRECTORY, $SROPATHCHANGE & "\") EndIf If $MSG = $SAVE Then $INIWRITE = GUICtrlRead($DIRECTORY) IniWrite($CSVFILE, "SilkroadSettings", "SilkroadPath", $INIWRITE) EndIf If $MSG = -3 Then Exit If $MSG = $START Then RUNNER() WEnd Func DCCOC() Sleep(250) If ProcessExists("SRO_Client.exe") then ProcessClose("SRO_Client.exe") RUNNER() EndFunc Func TOGGLEPAUSE() $PAUSED = Not $PAUSED While $PAUSED Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc Func TERMINATE() Exit EndFunc Func RUNNER() Local $PATH, $IDRED, $PWRED $PATH = GUICtrlRead($DIRECTORY) ProgressOn("Loading..","Loading...", "0%") ShellExecute("Silkroad.exe", "", $PATH, "") ProgressSet((1/7)*100, Round((1/7)*100,1)&"%") Sleep(10000) ProgressSet((2/7)*100, Round((2/7)*100,1)&"%") MouseClick("", 771, 517) Sleep(22000) ProgressSet((3/7)*100, Round((3/7)*100,1)&"%") Send("{SPACE}") sleep(250) $IDRED = GUICtrlRead($IDENTER) Send($IDRED) Send("{TAB}") ProgressSet((4/7)*100, Round((4/7)*100,1)&"%") $PWRED = GUICtrlRead($PWENTER) Send($PWRED) Sleep(250) ProgressSet((5/7)*100, Round((5/7)*100,1)&"%") FileInstall("Enter.exe", "Enter.exe") ProgressSet((6/7)*100, Round((6/7)*100,1)&"%") ShellExecute("Enter.exe", "", @ScriptDir) ProgressSet((7/7)*100, Round((7/7)*100,1)&"%") ProgressOff() EndFunc On the bright side... No syntax errors
Cha0sBG Posted May 18, 2008 Author Posted May 18, 2008 what ? so now it will display an Progressbar untill all the funcs are compleat ? and huh ? what do u mean by metaphorical stab Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread.
sandin Posted May 18, 2008 Posted May 18, 2008 (edited) try this: expandcollapse popup#Include <GuiConstants.au3> opt("RunErrorsFatal", 0) HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "Runner") Global $PAUSED, $RUNNER = False Dim $CSVFILE = @ScriptDir & "\Data\Path.ini" $MAIN = GUICreate("Autologin", 200, 200) GUICtrlCreateTab(0, 0, 200, 200) $MAINTAB = GUICtrlCreateTabItem("Main") $START = GUICtrlCreateButton("Start", 55, 160, 80) $DIRECTORY = GUICtrlCreateInput("Select Your Silkroad Directory", 10, 25, 175) $BROWSE = GUICtrlCreateButton("Browse", 9, 50, 80, 20) $SAVE = GUICtrlCreateButton("Save", 106, 50, 80, 20) GUICtrlCreateLabel("ID", 5, 80) GUICtrlCreateLabel("PW", 2, 105) $IDENTER = GUICtrlCreateInput("", 20, 75, 150, 20) GUICtrlSetBkColor(-1, 0) GUICtrlSetColor(-1, 16777215) $PWENTER = GUICtrlCreateInput("", 20, 100, 150, 20, 32) GUICtrlSetBkColor(-1, 0) GUICtrlSetColor(-1, 16777215) If FileExists($CSVFILE) then $INIREAD = IniRead($CSVFILE, "SilkroadSettings", "SilkroadPath", "Please Enter Your Silkroad Path") GUICtrlSetData($DIRECTORY, $INIREAD) EndIf $progress = GUICtrlCreateProgress(20, 130, 150, 20) $2NDTAB = GUICtrlCreateTabItem("Options") GUICtrlCreateTabItem("");closes tab GUISetState() While 1 $MSG = GUIGetMsg() If $MSG = $BROWSE Then $SROPATHCHANGE = FileSelectFolder("Select Silkroad Directory", @ProgramFilesDir) GUICtrlSetData($DIRECTORY, $SROPATHCHANGE & "\") ElseIf $MSG = $SAVE Then $INIWRITE = GUICtrlRead($DIRECTORY) IniWrite($CSVFILE, "SilkroadSettings", "SilkroadPath", $INIWRITE) elseif $MSG = -3 Then Exit ElseIf $MSG = $START Then RUNNER() EndIf WEnd Func DCCOC() Sleep(250) If ProcessExists("SRO_Client.exe") then ProcessClose("SRO_Client.exe") RUNNER() EndFunc Func TOGGLEPAUSE() $PAUSED = Not $PAUSED While $PAUSED Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc Func TERMINATE() Exit EndFunc Func RUNNER() Local $PATHES, $IDRED, $PWRED $PATHES = GUICtrlRead($DIRECTORY) GUICtrlSetData($progress, 10) ShellExecute("Silkroad.exe", "", $PATHES, "") if @error then MsgBox(0, "error", "error no. " & @error) GUICtrlSetData($progress, 20) Sleep(1000) MouseClick("", 771, 517) Sleep(500) GUICtrlSetData($progress, 30) Sleep(8000) GUICtrlSetData($progress, 40) Sleep(7000) GUICtrlSetData($progress, 50) Sleep(7000) GUICtrlSetData($progress, 60) Send("{SPACE}") sleep(250) GUICtrlSetData($progress, 70) $IDRED = GUICtrlRead($IDENTER) Send($IDRED) Send("{TAB}") GUICtrlSetData($progress, 80) $PWRED = GUICtrlRead($PWENTER) Send($PWRED) GUICtrlSetData($progress, 90) Sleep(250) FileInstall("Enter.exe", "Enter.exe") ShellExecute("Enter.exe", "", @ScriptDir) GUICtrlSetData($progress, 100) EndFunc this is edited paulie's code Edited May 18, 2008 by sandin Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
Paulie Posted May 21, 2008 Posted May 21, 2008 ...and huh ? what do u mean by metaphorical stab Perhaps these two links will help you http://dictionary.reference.com/search?r=2...;q=metaphoricalhttp://idioms.thefreedictionary.com/a+stab+in+the+dark
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