Guest Greg Thomas Posted June 7, 2004 Share Posted June 7, 2004 Took me a while to figure out why the following refused to work ...Dim autoIt As New AUTOITX3Lib.Control autoIt.Run "notepad.exe", ".", autoIt.AU3_SW_MAXIMIZEIt turns out the definition for Run expects a long rather than a ShowFlags. So I had to turn it in toautoIt.Run "notepad.exe", ".", 3 Is there a reason why the definition for Run (and possibly others, too) has a Long rather than a ShowFlags argument? IMHO, it's much easier to read than just '3'. Greg Link to comment Share on other sites More sharing options...
tutor2000 Posted June 8, 2004 Share Posted June 8, 2004 Took me a while to figure out why the following refused to work ...Dim autoIt As New AUTOITX3Lib.Control autoIt.Run "notepad.exe", ".", autoIt.AU3_SW_MAXIMIZEIt turns out the definition for Run expects a long rather than a ShowFlags. So I had to turn it in toautoIt.Run "notepad.exe", ".", 3 Is there a reason why the definition for Run (and possibly others, too) has a Long rather than a ShowFlags argument? IMHO, it's much easier to read than just '3'. GregI haven't tried run with max so I hadn't run () into that. I am trying to use HTAs for menus now which involves a lot of vbscript and autoitx so keep posting this stuff woul ya? rick Link to comment Share on other sites More sharing options...
Administrators Jon Posted June 8, 2004 Administrators Share Posted June 8, 2004 Took me a while to figure out why the following refused to work ...Dim autoIt As New AUTOITX3Lib.Control autoIt.Run "notepad.exe", ".", autoIt.AU3_SW_MAXIMIZEIt turns out the definition for Run expects a long rather than a ShowFlags. So I had to turn it in toautoIt.Run "notepad.exe", ".", 3 Is there a reason why the definition for Run (and possibly others, too) has a Long rather than a ShowFlags argument? IMHO, it's much easier to read than just '3'. GregI couldn't get it to work is the simple answer. If you know a resource that shows how to modify an activeX control to support this then let me know. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Guest Greg Thomas Posted July 5, 2004 Share Posted July 5, 2004 I couldn't get it to work is the simple answer. If you know a resource that shows how to modify an activeX control to support this then let me know.I would have thought that it would just be a case of changing the Run() method to take a ShowFlags parameter, rather than a long, but I'm not 100% sure.Greg Link to comment Share on other sites More sharing options...
bshoenhair Posted August 8, 2004 Share Posted August 8, 2004 Took me a while to figure out why the following refused to work ...Dim autoIt As New AUTOITX3Lib.Control autoIt.Run "notepad.exe", ".", autoIt.AU3_SW_MAXIMIZEIt turns out the definition for Run expects a long rather than a ShowFlags. So I had to turn it in toautoIt.Run "notepad.exe", ".", 3 Is there a reason why the definition for Run (and possibly others, too) has a Long rather than a ShowFlags argument? IMHO, it's much easier to read than just '3'. Greg <{POST_SNAPBACK}>(Works in March version) Should have been: autoIt.Run "notepad.exe", ".", AU3_SW_MAXIMIZE or like you used autoIt.Run "notepad.exe", ".", 3 Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 8, 2004 Administrators Share Posted August 8, 2004 (edited) (Works in March version) Should have been: autoIt.Run "notepad.exe", ".", AU3_SW_MAXIMIZE I could never get that to work when I tried in VBscript (seems to be OK in normal VB). I'm removing those and adding "properties" for the @error and show flags so it will be: oAutoIt.Run "notepad.exe", ".", oAutoIt.SW_MAXIMIZE Edited August 8, 2004 by Jon Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
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