Falling Posted May 17, 2004 Share Posted May 17, 2004 I want to make a script that opens a visual basic program (.vbp) and then runs that program (F5). This is just the start of something I want to do on a much larger scale but i can't seem to figure out how to do this. Though I will admit I have not spent too much time looking around. I'm new to this program. I tried to use the Run("") function but it says it cannot open a non-exe file. Is there some other function that i do not know of? Like a function that double clicks on a file but does not open its folder? Like maybe: dclick(file locaiton) or pressenter(filelocation)? I know some people will say why not just compile this first then run it that way. Well I could but then I'd have to setup differant databases and stuff for that sperate program. Which I'd rather not do just yet. Thanks for any information. Link to comment Share on other sites More sharing options...
Developers Jos Posted May 17, 2004 Developers Share Posted May 17, 2004 (edited) what about : Run(@comspec & " /c your_vb_project.vbp") Edited May 17, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Falling Posted May 17, 2004 Author Share Posted May 17, 2004 maybe i'm not useing it right but htat just seems to create a file that has inside of it when viewed with a text editor the the path in the function. Link to comment Share on other sites More sharing options...
emmanuel Posted May 17, 2004 Share Posted May 17, 2004 how would you normally execute the file? if it needs to pass through another file to be executed, include that in the run line, for vbs files you need to have the run line as such: Run('cscript.exe "script.Vbs"') dunno what runs a vb app without it being compiled (not being a vb programmer ) "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
Falling Posted May 17, 2004 Author Share Posted May 17, 2004 (edited) yeah that works. except you have to put the whole location in for some reason Run('"X:\Program Files\Microsoft Visual Studio\VB81\VB6.EXE" "X:\Projects\FolderX\someprogram.vbp"') You don't need the exta quotes i use either. just ' x "y" ' like the smart guy used. ' "x " "y " ' works also though. Thanks man. Do they actually call people who use VB programmers?! Edited May 17, 2004 by Falling Link to comment Share on other sites More sharing options...
emmanuel Posted May 17, 2004 Share Posted May 17, 2004 glad to have helped, the single quotes around the double quoted file paths passes the whole kit and caboose to windows exactly as though you'd typed it that way in to the run line... thus taking care of filenames with spaces... if you didn't have filenames with spaces, you wouldn't need the double quotes inside... ' "some path\to some file.exe" "some path to some other file.doc" ' see faq #7 for more about quotes... "I'm not even supposed to be here today!" -Dante (Hicks) 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