|
-
Aug 9th, 2013, 01:20 PM
#1
Thread Starter
New Member
Convert Script to Exe
I am stuck with one point , I developed a micro recorder which will record and play back user action form IE
for example
action Go (http://google.com)
action set q="hiop"
click button = scr
I am saving this script in xml format , when user wish to play back this script he need to load the saved script in my program and click on play button then program play back the script
Now I wish to save this script as batch file or exe or some thing similar so when user click on it , It will automatically open new instance my program ,load the script and play back it so user dont have to load manually and click on play button
Thanks
-
Aug 9th, 2013, 01:26 PM
#2
Re: Convert Script to Exe
What is the script? I've never seen anything like that. Anyways, the only thing that I can think of is Process.Start. However you mention that it's an XML file, I would think if you called .Start on an XML file it'd probably open it up in your default web browser.
-
Aug 9th, 2013, 01:42 PM
#3
Thread Starter
New Member
Re: Convert Script to Exe
Hi
Thanks for quick replay It my custom developed application Imacro where user can record actions and save it(xml) for future use - when user wish to use this script he need to open my program and load the script in my program then need to click on play button
I wish to reduce this manual work to open program - load script - click on play button
I wish user will simply click on saved script (currently I am saving it to xml format but I can if required) and it will be played back
some thing like vbscript
-
Aug 9th, 2013, 01:45 PM
#4
Re: Convert Script to Exe
So you're essentially wanting to write your own language and launch it from visual basic?
Edit - I just found this, but I really don't know enough to help you out any further. Although I do feel like Process.Start will probably be what you need.
-
Aug 9th, 2013, 02:54 PM
#5
Re: Convert Script to Exe
Actually, it sounds like what you want to do is have a file extension linked to your app such that clicking on such a file will launch and run, much the way that clicking on an .xls file will launch Excel. Is that correct?
My usual boring signature: Nothing
 
-
Aug 9th, 2013, 03:00 PM
#6
Thread Starter
New Member
Re: Convert Script to Exe
Hi yes , so far I reached to a conclusion that I can achieve this part by using batch file like
start "" notepad "E:\some file with spaces.txt"
but still worried about - how my program will identified that it is opened form a batch request and due to that automatically click on a play button, because currently user need to open my program then open/load file in my program and click on play button I wish to reduce this process
-
Aug 9th, 2013, 03:00 PM
#7
Thread Starter
New Member
Re: Convert Script to Exe
Hi yes , so far I reached to a conclusion that I can achieve this part by using batch file like
start "" notepad "E:\some file with spaces.txt"
but still worried about - how my program will identified that it is opened form a batch request and due to that automatically click on a play button, because currently user need to open my program then open/load file in my program and click on play button I wish to reduce this process
-
Aug 9th, 2013, 07:47 PM
#8
Lively Member
Re: Convert Script to Exe
Shree as Shaggy Hiker pointed out you want to change the file extension for your "script" to something else that isn't already being used (be creative). So change it from script.xml to script.123 then when you double click the .123 file windows will prompt you for the program to use. Select your program and check the box to always use your exe with that file extension. Then in your program you just add this to the application startup:
Code:
Private Sub Application_Startup(ByVal sender As Object, ByVal e As System.Windows.StartupEventArgs) Handles Me.Startup
Dim strScriptPath As String
If e.Args.Length <> 0 Then
strScriptPath = (e.Args(0).ToString)
'Code to open script and run it
End If
End Sub
-
Aug 9th, 2013, 09:50 PM
#9
Thread Starter
New Member
Re: Convert Script to Exe
hi
yes i found few article how to map my custom file name with my program like .123 extantion will get open in my program it self
associate the file type to the application
Application Registration
Thanks for all help
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|