Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development > Front Ends > Road Runner > RR Skins


Reply
 
Share Thread Tools Display Modes
Old 10-28-2009, 05:01 AM   #1
Maximum Bitrate
 
pierrotm777's Avatar
 
Join Date: May 2008
Location: Bordeaux, France
Posts: 588
pierrotm777 will become famous soon enough
Create 5 commands in a screen who call an autoit exe

Hi,

I have a little programme autoit (thanks again John) with 5 commands

_WHEELUP()
_WHEELDOWN()
_CLICKRIGHT()
_SLIDEON()
_SLIDEOFF

Who call:

Code:
Func _WHEELUP() WinActivate ($WindowsName) MouseMove(500, 300, 10) MouseWheel("up", 5) EndFunc Func _WHEELDOWN() WinActivate ($WindowsName) MouseMove(500, 300, 10) MouseWheel("down", 5) EndFunc Func _CLICKRIGHT() WinActivate ($WindowsName) MouseMove(500, 300, 10) MouseClick("right", 500, 300, 1, 10) EndFunc Func _SLIDEON() WinActivate ($WindowsName) MouseClick("left", 380, 80, 1, 10) EndFunc Func _SLIDEOFF() WinActivate ($WindowsName) MouseMove(5, 80) MouseClick("left", 5, 80, 1, 10) EndFunc

In a screen I have defines 5 buttons:

Code:
/, B, x, y, w, h, Command;COMMANDCODES, Tooltip B08,269,543,64,64,"","Mouse Right" B08,336,542,64,64,"WHEELDOWN","Roll Down" B08,73,543,64,64,"WHEELUP","Roll Up" B08,138,544,64,64,"","Mouse Left" B08,204,543,64,64,"CLICKRIGHT","Right Click"


In my autoit exe i have some test but don't run :

Code:
If $rr.GetInfo("WHEELUP") Then _WHEELUP() If $rr.GetInfo("WHEELDOWN") Then _WHEELDOWN() If $rr.GetInfo("CLICKRIGHT$") Then _CLICKRIGHT() If $rr.GetInfo("SLIDEON$") Then _SLIDEON() If $rr.GetInfo("SLIDEOFF") Then _SLIDEOFF()


Who can help me and say me what i must to do .
Thanks
pierrotm777 is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 10-30-2009, 06:58 AM   #2
Maximum Bitrate
 
pierrotm777's Avatar
 
Join Date: May 2008
Location: Bordeaux, France
Posts: 588
pierrotm777 will become famous soon enough
48 readings and nobody can help me ?

Please who can take some time for to help me ?

Thanks
pierrotm777 is offline   Reply With Quote
Old 10-30-2009, 08:40 AM   #3
RoadRunner Mastermind
 
guino's Avatar
 
Join Date: Nov 2004
Location: Vitória, ES - Brazil
Posts: 9,064
guino will become famous soon enoughguino will become famous soon enough
http://www.mp3car.com/vbulletin/road...t-program.html

Some of the code in that thread is available with the SDK examples provided with the installer. All you have to do is add that code from post #5 of that thread, then where there's the "this"/"that" you'll compare the cmd received with a command to execute each of your 5 functions. Then on the RR side you'll use the SENDMSG;Receiver;<COMMAND> on each button you made (so it executes each corresponding function in the autoit script). That thread shows an alternate way of doing things too, but what I just described is likely the best choice.

Should look like this (UNTESTED):
Code:
Global Const $StructDef_COPYDATA = "ptr;dword;ptr" Global Const $WM_COPYDATA = 0x4A Global Const $WM_CLOSE = 0x10 Global Const $STRUCTDEF_AU3MESSAGE = "char[255]" Dim $cmd ; Create Reciver window $hwmd_Reciver = GUICreate("PierReceiver") ; Register Windows Messages GUIRegisterMsg($WM_COPYDATA, "_GUIRegisterMsgProc") GUIRegisterMsg($WM_CLOSE, "_GUIRegisterMsgProc") ;Loop indefinitely - put your commands in here While 1 If $cmd = "WHEELUP" Then $cmd = "" _WHEELUP() Endif If $cmd = "WHEELDOWN" Then $cmd = "" _WHEELDOWN() Endif If $cmd = "CLICKRIGHT" Then $cmd = "" _CLICKRIGHT() Endif If $cmd = "SLIDEON" Then $cmd = "" _SLIDEON() Endif If $cmd = "SLIDEOFF" Then $cmd = "" _SLIDEOFF() Endif Sleep(250) WEnd ; Message Handler Func _GUIRegisterMsgProc($hWnd, $MsgID, $WParam, $LParam) If $MsgID = $WM_COPYDATA Then ; We Recived a WM_COPYDATA Message ; $LParam = Poiter to a COPYDATA Struct $vs_cds = DllStructCreate($StructDef_COPYDATA, $LParam) ; Member No. 3 of COPYDATA Struct (PVOID lpData;) = Pointer to Costum Struct $vs_msg = DllStructCreate($STRUCTDEF_AU3MESSAGE, DllStructGetData($vs_cds, 3)) $SciTECmdLen = DllStructGetData($vs_cds, 2) $cmd = StringLeft(DllStructGetData($vs_msg, 1), $SciTECmdLen) ; Display what we have recived ; MsgBox(0, "Test String", $cmd) ElseIf $MsgID = $WM_CLOSE Then ; We Recived a WM_CLOSE Message Exit EndIf EndFunc ;==>_GUIRegisterMsgProc

In RR:
Code:
/, B, x, y, w, h, Command;COMMANDCODES, Tooltip B08,269,543,64,64,"","Mouse Right" B08,336,542,64,64,"SENDMSG;PierReceiver;WHEELDOWN","Roll Down" B08,73,543,64,64,"SENDMSG;PierReceiver;WHEELUP","Roll Up" B08,138,544,64,64,"","Mouse Left" B08,204,543,64,64,"SENDMSG;PierReceiver;CLICKRIGHT","Right Click"

__________________
Ride Runner RR's Myspace

"Being happy is not about having what you want, it's about wanting what you have."
"The best things in life are always free - but that doesn't mean money can't buy you good things."

Last edited by guino; 10-30-2009 at 08:48 AM.
guino is offline   Reply With Quote
Old 10-30-2009, 08:51 AM   #4
Maximum Bitrate
 
pierrotm777's Avatar
 
Join Date: May 2008
Location: Bordeaux, France
Posts: 588
pierrotm777 will become famous soon enough
Quote: Originally Posted by guino View Post
http://www.mp3car.com/vbulletin/road...t-program.html

Some of the code in that thread is available with the SDK examples provided with the installer. All you have to do is add that code from post #5 of that thread, then where there's the "this"/"that" you'll compare the cmd received with a command to execute each of your 5 functions. Then on the RR side you'll use the SENDMSG;Receiver;<COMMAND> on each button you made (so it executes each corresponding function in the autoit script). That thread shows an alternate way of doing things too, but what I just described is likely the best choice.

Should look like this (UNTESTED):
Code:
Global Const $StructDef_COPYDATA = "ptr;dword;ptr" Global Const $WM_COPYDATA = 0x4A Global Const $WM_CLOSE = 0x10 Global Const $STRUCTDEF_AU3MESSAGE = "char[255]" Dim $cmd ; Create Reciver window $hwmd_Reciver = GUICreate("PierReceiver") ; Register Windows Messages GUIRegisterMsg($WM_COPYDATA, "_GUIRegisterMsgProc") GUIRegisterMsg($WM_CLOSE, "_GUIRegisterMsgProc") ;Loop indefinitely - put your commands in here While 1 If $cmd = "WHEELUP" Then $cmd = "" _WHEELUP() Endif If $cmd = "WHEELDOWN" Then $cmd = "" _WHEELDOWN() Endif If $cmd = "CLICKRIGHT" Then $cmd = "" _CLICKRIGHT() Endif If $cmd = "SLIDEON" Then $cmd = "" _SLIDEON() Endif If $cmd = "SLIDEOFF" Then $cmd = "" _SLIDEOFF() Endif Sleep(250) WEnd ; Message Handler Func _GUIRegisterMsgProc($hWnd, $MsgID, $WParam, $LParam) If $MsgID = $WM_COPYDATA Then ; We Recived a WM_COPYDATA Message ; $LParam = Poiter to a COPYDATA Struct $vs_cds = DllStructCreate($StructDef_COPYDATA, $LParam) ; Member No. 3 of COPYDATA Struct (PVOID lpData;) = Pointer to Costum Struct $vs_msg = DllStructCreate($STRUCTDEF_AU3MESSAGE, DllStructGetData($vs_cds, 3)) $SciTECmdLen = DllStructGetData($vs_cds, 2) $cmd = StringLeft(DllStructGetData($vs_msg, 1), $SciTECmdLen) ; Display what we have recived ; MsgBox(0, "Test String", $cmd) ElseIf $MsgID = $WM_CLOSE Then ; We Recived a WM_CLOSE Message Exit EndIf EndFunc ;==>_GUIRegisterMsgProc

In RR:
Code:
/, B, x, y, w, h, Command;COMMANDCODES, Tooltip B08,269,543,64,64,"","Mouse Right" B08,336,542,64,64,"SENDMSG;PierReceiver;WHEELDOWN","Roll Down" B08,73,543,64,64,"SENDMSG;PierReceiver;WHEELUP","Roll Up" B08,138,544,64,64,"","Mouse Left" B08,204,543,64,64,"SENDMSG;PierReceiver;CLICKRIGHT","Right Click"

Thank you very much Guino, I try that.

Thanks you very much.
pierrotm777 is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
any feedback info. on Dynamix 7" VGA Touch Screen TFT ??? xtreamvette LCD/Display 29 04-22-2007 04:19 PM
Tweaked 2.5 a little bit d_sellers1 SkinBedder 0 12-01-2005 08:29 AM
FS: IBM Thinkpad 1400, National Display Systems Screen emailthis1 Classified Archive 8 10-02-2005 03:02 PM
SpeakEasy Voice Recognition - Release 0.9.1 ruairi Software & Software Development 11 06-03-2005 06:19 PM
BASIC Stamp question Banderon General Hardware Discussion 18 05-07-2004 09:33 AM



All times are GMT -5. The time now is 08:18 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics