Sign in to follow this  
Followers 0
Guest Greg Thomas

Active X DLL - format of Run() method

6 posts in this topic

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_MAXIMIZE
It turns out the definition for Run expects a long rather than a ShowFlags. So I had to turn it in to
autoIt.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

Share this post


Link to post
Share on other sites



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_MAXIMIZE
It turns out the definition for Run expects a long rather than a ShowFlags. So I had to turn it in to
autoIt.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

I 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


Only $2.00 with Resale Rights How to Block Better for Martial Artists and NonMartial Artistshttp://kirkhamsebooks.com/MartialArts/Bloc...tterEbook_m.htm

Share this post


Link to post
Share on other sites

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_MAXIMIZE
It turns out the definition for Run expects a long rather than a ShowFlags. So I had to turn it in to
autoIt.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

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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_MAXIMIZE
It turns out the definition for Run expects a long rather than a ShowFlags. So I had to turn it in to
autoIt.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

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by Jon

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0