tonycst Posted August 18, 2017 Share Posted August 18, 2017 expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=ARK Spawner.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Misc.au3> Global $hDLL = DllOpen("user32.dll") FileInstall(@ScriptDir & "\Count.wav", @TempDir & "\Count.wav", 1) FileInstall(@ScriptDir & "\Spawned.wav", @TempDir & "\Spawned.wav", 1) Global $INI = @ScriptDir & "\Settings.ini" $Win = "ARK: Survival Evolved" Global $Beep = @TempDir & "\Count.wav" Global $Spawned = @TempDir & "\Spawned.wav" WinActivate($Win) WinWaitActive($Win) Global $Count = IniRead($INI, "LastCommand", "Command", "") While 1 If _IsPressed("4E", $hDLL) Then _Send() ;N key EndIf If _IsPressed("4D", $hDLL) Then Assign("Count", $Count - 1) SoundPlay($Beep, 1) SoundPlay($Beep, 1) EndIf WEnd Func _Send() SoundPlay($Beep) Sleep(2000) ;must sleep Send("~") $Commmand = IniRead($INI, "Commands", $Count, "") Send($Commmand) Send("{ENTER}") SoundPlay($Spawned) Assign("Count", $Count + 1) IniWrite($INI, "LastCommand", "Command", $Count) EndFunc ;==>_Send Whats causing this error ? Script DOES work if u just run it. It DOES NOT work only when i build/compile it. Make nonsense. Not to mention, the "~" key is not being sent like 30% of the time. I am trying to pass command line into game console when user presses N on the keyboard. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 18, 2017 Moderators Share Posted August 18, 2017 tonycst, Quote Make nonsense It makes perfect sense. The source file must be a literal string and your code contains a macro (@ScriptDir). From the Help file: Quote The source file must be specified using a string literal and can not be a variable, a macro, a calculation nor function call. Plus this script looks like it involves gaming, so please explain why I should not lock the thread. 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...
tonycst Posted August 19, 2017 Author Share Posted August 19, 2017 (edited) Darn it. I did read the help file on that. How ever, the only issue why i missed it is because "i think" it worked in older releases. Thanks I totally missed it. I am playing ark single player and i want to pass player spawn commands to the console. Commands dont work online, its just single player stuff. No hacking, just spawning player in specific coordinates with a single click. There is around 100 or so locations. Typing coordinates for all of them is too much of an issue. Edited August 19, 2017 by tonycst Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 19, 2017 Moderators Share Posted August 19, 2017 tonycst, Quote I am playing ark single player and i want to pass player spawn commands to the console So the script is indeed game-related and therefore the thread will be locked. The rules are quite clear: Quote script interaction with games It matters not whether it is single- or multi-player. 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