I am trying to find a simple starting point for using postmessage (in JScript but VBscript is ok), for example to click a button in windows Calculator.
Is this possible, can anyone provide an example?!
Thanks,
Alex
------------
PS I think it will go like this, but when I try it I get 'Object doesn't support this property or method'.
var shell = new ActiveXObject("WScript.shell");
oAutoIt = new ActiveXObject("AutoItX3.Control");
shell.Run("calc.exe", 1);
oAutoIt.Sleep(500);
$hwnd = oAutoIt.WinGetHandle("Calculator");
oAutoIt.DllCall("user32.dll", "int", "SendMessage", "hwnd", $hwnd , "int" , 1075 , "int", 2400, "int", 0);
Simplest example of using postmessage to click a button with AutoitX?
Started by
proTester
, Jul 06 2012 12:43 AM
7 replies to this topic
#1
Posted 06 July 2012 - 12:43 AM
#2
Posted 06 July 2012 - 12:49 PM
DllCall is not in autoitx.
AutoIt Absolute Beginners Require a serial
Run('hh mk:@MSITStore:'&StringReplace(@AutoItExe,'.exe','.chm')&'::/html/tutorials/helloworld/helloworld.htm','',@SW_MAXIMIZE)
#3
Posted 06 July 2012 - 01:05 PM
DllCall is not in autoitx.
OK Thanks, maybe there's another ActiveX wrapper to use dll calls from JScript.
#4
Posted 06 July 2012 - 01:30 PM
I'm not sure about either, but I'd imaging you will find something in VB.
But It is certainly not an autoitx question. Maybe if you ask a moderator to move your thread to chat or developer chat.
But It is certainly not an autoitx question. Maybe if you ask a moderator to move your thread to chat or developer chat.
AutoIt Absolute Beginners Require a serial
Run('hh mk:@MSITStore:'&StringReplace(@AutoItExe,'.exe','.chm')&'::/html/tutorials/helloworld/helloworld.htm','',@SW_MAXIMIZE)
#5
Posted 06 July 2012 - 02:13 PM
There is function ControlClick() in AutoItX which you can use for your calculator buttons.
#6
Posted 07 July 2012 - 05:55 PM
DllCall is not in autoitx.
There is function ControlClick() in AutoItX which you can use for your calculator buttons.
Thanks, just wanted to know if it was supported. ControlClick() looks interesting. (For dll calls from JScript I'm now using DynamicWrapperX )
#7
Posted 07 July 2012 - 07:38 PM
Does that give you access to windows API on remote machines from web content?
AutoIt Absolute Beginners Require a serial
Run('hh mk:@MSITStore:'&StringReplace(@AutoItExe,'.exe','.chm')&'::/html/tutorials/helloworld/helloworld.htm','',@SW_MAXIMIZE)
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users





