Botter Posted July 20, 2012 Share Posted July 20, 2012 I am splitting my files up for simplicity sake. I have a function that uses global variables as optional parameters, it looks like this: Func Wait4P( $pic, $waittime, $whattodo = 0, $errorjump = $program_fail_count, $startx = $windowstartx, $starty = $windowstarty, $width = $window_width, $height = $window_height ) I want that function in my graphics file, not my main file. But when I do this in my main file: $array = Wait4P( $IMG_files & "d3desktop.png", 2000, 10 ) I get this error: C:\AutoIt\Diablo3Startup\LoadChris_6713.au3 (72) : ==> Variable used without being declared.: $array = Wait4P( $IMG_files & "d3desktop.png", 2000, 10 ) $array = Wait4P( $IMG_files & "d3desktop.png", 2000, 10 )^ ERROR >Exit code: 1 Time: 0.312 Am I going to have to forgo using globals to define optional function parameters or is there a way to do this? Link to comment Share on other sites More sharing options...
JohnOne Posted July 20, 2012 Share Posted July 20, 2012 There are tons of ways to get around this. Unfortunately for you, you felt the need to blatently flaunt the forum rules about game scripts so I'm unable to answer. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Botter Posted July 20, 2012 Author Share Posted July 20, 2012 My question was about autoit basic functionality. Not game scripts. Link to comment Share on other sites More sharing options...
JohnOne Posted July 20, 2012 Share Posted July 20, 2012 "autoit basic functionality" of "Diablo3Startup". AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 21, 2012 Moderators Share Posted July 21, 2012 Botter,Your question might well have been about "autoit basic functionality" but you made it quite clear that the script was intended for "game automation". As such it falls foul of the Forum rules to which you were linked and so this thread is now locked. There is a message hidden in that statement if you care to look for it - it always amazes me that so many new members are apparently unable to see it. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts