Jump to content

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


TobiFX
 Share

Recommended Posts

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

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

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

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...