Jump to content

Active X DLL - format of Run() method


Guest Greg Thomas
 Share

Recommended Posts

Guest Greg Thomas

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

Link to comment
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

Link to comment
Share on other sites

  • Administrators

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.
Link to comment
Share on other sites

  • 4 weeks later...
Guest Greg Thomas

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

  • 1 month later...

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

Link to comment
Share on other sites

  • Administrators

(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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...