proTester Posted July 6, 2012 Posted July 6, 2012 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);
JohnOne Posted July 6, 2012 Posted July 6, 2012 DllCall is not in autoitx. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
proTester Posted July 6, 2012 Author Posted July 6, 2012 DllCall is not in autoitx.OK Thanks, maybe there's another ActiveX wrapper to use dll calls from JScript.
JohnOne Posted July 6, 2012 Posted July 6, 2012 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. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Zedna Posted July 6, 2012 Posted July 6, 2012 There is function ControlClick() in AutoItX which you can use for your calculator buttons. Resources UDF ResourcesEx UDF AutoIt Forum Search
proTester Posted July 7, 2012 Author Posted July 7, 2012 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 )
JohnOne Posted July 7, 2012 Posted July 7, 2012 Does that give you access to windows API on remote machines from web content? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
proTester Posted July 8, 2012 Author Posted July 8, 2012 I think it used to in the early days of ActiveX but now security restrictions would prevent it! I'm looking at building HTAs for testing which run like HTML webpages but locally, without security restrictions.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now