some function like that?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
ranzou
Newbie
Posts: 3
Joined: Mon Jun 01, 2009 5:39 pm

some function like that?

Post by ranzou » Mon Jun 01, 2009 5:49 pm

hi!! there are a fell days since I have trying to white a macro to a game using macro scheduler, i know there's no much people here how know about games, but a do use another macro program before, "autoit3" and using the function StdinWrite i can easy send any data to the game, here the description of the function
http://www.autoitscript.com/autoit3/doc ... nWrite.htm
Does the macro scheduler have a similar function?

Example using autoit3

Code: Select all

StdinWrite("{SHIFTDOWN}{SHIFTUP}")

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Jun 01, 2009 6:20 pm

Same function here:

Press> SHIFT
Release>SHIFT

I have usee both AutoIt3 and Macro Scheduler. Macro Scheduler is definitely much easier to use, It also has a very acrive forum with lots of help from the users, and the development tema is here every day with timely responses for enhnacement requests and programming solutions.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

ranzou
Newbie
Posts: 3
Joined: Mon Jun 01, 2009 5:39 pm

Post by ranzou » Mon Jun 01, 2009 7:50 pm

Bob Hansen wrote:Same function here:

Press> SHIFT
Release>SHIFT

I have usee both AutoIt3 and Macro Scheduler. Macro Scheduler is definitely much easier to use, It also has a very acrive forum with lots of help from the users, and the development tema is here every day with timely responses for enhnacement requests and programming solutions.
I belive that this function are more complicated, i have try using Press> and Release> before, but the game does not receive any data,

you can see the official example of the function working

Code: Select all

; Demonstrates the use of StdinWrite()
#include <Constants>

Local $foo = Run("sort.exe", @SystemDir, @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD)
; Write string to be sorted to child sort.exe's STDIN
StdinWrite($foo, "rat" & @CRLF & "cat" & @CRLF & "bat" & @CRLF)
; Calling with no 2nd arg closes stream
StdinWrite($foo)

; Read from child's STDOUT and show
Local $data
While True
    $data &= StdoutRead($foo)
    If @error Then ExitLoop
    Sleep(25)
WEnd
MsgBox(0, "Debug", $data)

thanks for you help, 100% macro scheduler ^^

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Jun 01, 2009 11:28 pm

It is most likely that you are missing a SetFocus> command before the Press/Send commands. You may also need one of a number of Wait commands also, like WaitWindowOpen> or WaitReady>

As to why Press> is not working, we can only guess at this point. Need to see the Macro Scheduler script that was not working.

================================================
Here is a quick way to sort the words from your example:

Code: Select all

Let>RP_WAIT=1
Let>RP_WINDOWMODE=0
WriteLn>temp1.txt,vResult,rat
WriteLn>temp1.txt,vResult,cat
WriteLn>temp1.txt,vResult,bat
ReadFile>temp1.txt,vRawList
Run Program>cmd /c sort temp1.txt /O temp2.txt
ReadFile>temp2.txt,vSortedList
MessageModal>Raw list is %CRLF%%vRawList%
MessageModal>Sorted list is %CRLF%%vSortedList%
DeleteFile>temp1.txt
DeleteFile>temp2.txt
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts