TobiFX Posted October 13, 2008 Share Posted October 13, 2008 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 More sharing options...
enaiman Posted October 13, 2008 Share Posted October 13, 2008 There is no problem at all.InetGet("http://www.cboe.com/publish/ScheduledTask/MktData/datahouse/totalpc.csv", "C:\Data\files\CBOE-Data.txt", 1, 0) works fine because you provided a path (C:\Data\files\CBOE-Data.txt) so the script knows where to save the file.While InetGet("http://www.cboe.com/publish/ScheduledTask/MktData/datahouse/totalpc.csv", "CBOE-Data.txt", 1, 0) 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 More sharing options...
TobiFX Posted October 13, 2008 Author Share Posted October 13, 2008 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 More sharing options...
enaiman Posted October 13, 2008 Share Posted October 13, 2008 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 :) Link to comment Share on other sites More sharing options...
TobiFX Posted October 14, 2008 Author Share Posted October 14, 2008 No it's working perfect. Thanks a lot for your help!! Kind regards, Tobi Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now