Jump to content

Recommended Posts

Posted
#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.

 

 

 

 

 

  • Moderators
Posted

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted (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 by tonycst
  • Moderators
Posted

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...