Sign in to follow this  
Followers 0
TobiFX

Problem when running AutoIt *.exe out of MS-Excel

5 posts in this topic

Hello AutoIt experts!

I would like to run an *.exe file created with AutoIt out of MS-Excel (Shell command).

When the script/*.exe file is setup the following way everthing works fine:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****

#AutoIt3Wrapper_outfile=Download_CBOE-Data.exe

#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

InetGet("http://www.cboe.com/publish/ScheduledTask/MktData/datahouse/totalpc.csv", "C:\Data\files\CBOE-Data.txt", 1, 0)

When the script/*.exe file is setup this way, the CBOE-Data.txt file is not created when running the Download_CBOE-Data.exe out of MS-Excel.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****

#AutoIt3Wrapper_outfile=Download_CBOE-Data.exe

#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

InetGet("http://www.cboe.com/publish/ScheduledTask/MktData/datahouse/totalpc.csv", "CBOE-Data.txt", 1, 0)

The strange thing I don't understand is, when running this Download_CBOE-Data.exe by hand (double click in the Explorer), it'll create the CBOE-Data.txt file.

Any idea what the problem is and how to solve it?

Thanks in advance,

Tobi

I'm using Windows XP Professional and Excel 2003

Share this post


Link to post
Share on other sites



There is no problem at all.

works fine because you provided a path (C:\Data\files\CBOE-Data.txt) so the script knows where to save the file.

While

doesn't work because you haven't specified a path. CBOE-Data.txt (the file name) is not enough to uniquely identify a file.

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

But when I create an .exe file of

InetGet("http://www.cboe.com/publish/ScheduledTask/MktData/datahouse/totalpc.csv", "CBOE-Data.txt", 1, 0)

and double click this .exe in the Explorer it DOES create the CBOE-Data.txt file ... in the same path the .exe is in!?

If I undersand correctly, there's an example like that in the AutoIt help, too. It's just not working when running it via a macro in Excel.

Share this post


Link to post
Share on other sites

It will always create the file in the same folder if you use:

InetGet("http://www.cboe.com/publish/ScheduledTask/MktData/datahouse/totalpc.csv", @ScriptDir&"\CBOE-Data.txt", 1, 0)

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

No it's working perfect. Thanks a lot for your help!!

Kind regards,

Tobi

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