Sign in to follow this  
Followers 0
GEOSoft

ShellExecute

5 posts in this topic

This is only an observation and not a feature request!!!!

It's probably way too late anyway.

I thimk that ShelExecute and ShellExecuteWait should have been made moe compatible with Run and Run Wait. That is It should be

ShellExecute(<Path/file>,[working dir],[showflag],[Parameters],[verb]) with Open being the default Verb.

I didn't notice the difference until I went to change a dozen or so Runs to Shell Executes

All of the lines involved Used Run(<File>,'',@SW_MAXIMIZED) and it would have been great if I could have changed Run to ShellExecute and that was all.

Instead I had to change it to

ShellExecute(<File>,'','','Open', @SW_Maximized)

Not a mind boggling situation, howerver it didn't seem as user friendly as it could have been.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites



I didn't notice the difference until I went to change a dozen or so Runs to Shell Executes

Just click the button

Posted Image

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Just click the button

Posted Image

8)

Wise Guy!! 8)

Thats how I did it (I said it wasn't mind boggling) but actually the method you posted won't work exactly as posted.

Some of the files were CHM's others were HLP's so there wre 2 different apps involved.

I used Global Search and Replace (Nice App!! ) to do it. It allows regular expressions in the string so it would replace the

Run ("hh.exe "<filename>

With ShellExecute (<Filename>

and switch the rest of the string.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

The parameters are different because the underlying Run API has the command.exe AND command line parameters passed as a single parameter whereas the underlying ShellExecute API separates the command.exe and the parameters. Any code that I wrote to try and convert one to the other would no doubt be flawed - so I didn't.

Share this post


Link to post
Share on other sites

The parameters are different because the underlying Run API has the command.exe AND command line parameters passed as a single parameter whereas the underlying ShellExecute API separates the command.exe and the parameters. Any code that I wrote to try and convert one to the other would no doubt be flawed - so I didn't.

Thanks for that explanation Jon

I didn't want you to re-write code, it was just an obsevation. I think I'll probably just write a function to change it in the future because I have several older scripts (before we had shellexecute) that should be changed. I already have a script that updates syntax tha is obsolete to the new syntax. As in TimerStart = Timer Init and TimerStop = TimerDiff. I'll just add the function into that script as an option.

BTW I was in the middle of preparing a PM for you on another matter. so you can expect it soon. ;)


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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