Jump to content

Launch AutoIt from IE


Recommended Posts

I'm having a hard time figuring this out.

I have a simple web page with vbscript and 1 button. When the user clicks the button, I want vbscript to launch Autoit.

I keep getting an IE error telling me it can't open the file. I think it has to do with the spaces in the path. I tried to escape the quotations but it did not work.

Here's what I have so far in vb script:

Set WshShell = CreateObject("WScript.Shell")

Sub RunCode 
        WshShell.Run("C:\Progra~1\AutoIt3\AutoIt3.exe C:\Documents and Settings\User\My Documents\Clients\Scripts\GetValue.au3")
End Sub

I also tried: WshShell.Run("C:\Progra~1\AutoIt3\AutoIt3.exe C:\Docume~1\User\My~1\Clients\Scripts\GetValue.au3")

but it didn't work.

What am I doing wrong?

Link to comment
Share on other sites

i'm not sure about the code aboce but if the client don't have a Scite installed then it sure can't work, try compile it to .exe first

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Link to comment
Share on other sites

Yes, it is a whilte space problem. Try:

WshShell.Run("C:\Progra~1\AutoIt3\AutoIt3.exe ""C:\Documents and Settings\User\My Documents\Clients\Scripts\GetValue.au3""")

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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