Is it possible to open a program or file with imacro?

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Dimar
Posts: 17
Joined: Fri May 01, 2015 2:57 am

Is it possible to open a program or file with imacro?

Post by Dimar » Thu Jan 21, 2016 3:57 am

Hello. Happy and productive year 2016

I wanted to know: Is it possible to open a program or file with imacro?

Thanks
Tanckom
Posts: 79
Joined: Fri Jan 15, 2016 12:12 pm

Re: Is it possible to open a program or file with imacro?

Post by Tanckom » Thu Jan 21, 2016 7:23 am

As far as i can tell, yes, but it depends on the file/programm and I'm not 100% sure.
FCIM
Firefox: 56.0
Os: Windows 10 x64
iMacros: 9.0.3
Dimar
Posts: 17
Joined: Fri May 01, 2015 2:57 am

Re: Is it possible to open a program or file with imacro?

Post by Dimar » Thu Jan 21, 2016 9:39 pm

Thanks Tanckom is an .exe file. Someone who can sure you can? And what would the code to use?
chivracq
Posts: 9807
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Is it possible to open a program or file with imacro?

Post by chivracq » Thu Jan 21, 2016 9:48 pm

Well, check how I had replied to your previous Thread, I'm tired of asking the same things... :roll:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Dimar
Posts: 17
Joined: Fri May 01, 2015 2:57 am

Re: Is it possible to open a program or file with imacro?

Post by Dimar » Thu Jan 21, 2016 10:47 pm

Sorry chivracq, I do not understand what it says. My intention is not to annoy, if so sorry.
chivracq
Posts: 9807
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Is it possible to open a program or file with imacro?

Post by chivracq » Fri Jan 22, 2016 3:29 am

Dimar wrote:Sorry chivracq, I do not understand what it says. My intention is not to annoy, if so sorry.
You don't annoy, nobody is forcing me to spend most of my Free Time solving Everybody's Questions/Problems regarding iMacros on this Forum...

I'm just asking People starting a Thread to read the Forum Rules and to mention their FCI (many Commands are not implemented for all 4 Browsers and regularly get broken from/till a specific Browser/iMacros Version) and when possible to post the URL or upload an HTML Saveas of the Page if it's behind L&P and to post their Script and what they've tried before being really stuck... Sorry, I only help People who really get stuck after they've done their best by themselves, I don't help lazy Script Kiddies just looking for a ready-to-use Script to impress their Friends... (Not meaning that you are, but, well, I hope you understand the "differentiation"...)
And you are not a first time Poster (otherwise, I definitely wouldn't even have reacted at all...), I already asked you for your FCI in your previous Thread...

So short Answer in your Case...: CIM...! :mrgreen:

(And maybe a bit more Info, you only mention in your 2nd Post that it will be an .EXE, this Info should have already been mentioned in your first Post... Any more Info...? Which .EXE...? If not known, doing what...? Communication with iMacros needed between your .EXE and iMacros for whatever "secret" Browser and Versions you are using...? To communicate what...?)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Dimar
Posts: 17
Joined: Fri May 01, 2015 2:57 am

Re: Is it possible to open a program or file with imacro?

Post by Dimar » Tue Jan 26, 2016 9:52 pm

You have every reason chivracq, , sorry.

The imacro I'm working on a Windows XP, virtualized with VirtualBox.

The imacro is version 8.9.6 for Firefox in version 38.

What I look for is that the imacro work in Firefox, then run an .EXE file, which will perform automated jobs in Windows XP.
chivracq
Posts: 9807
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Is it possible to open a program or file with imacro?

Post by chivracq » Thu Jan 28, 2016 5:08 am

Dimar wrote:You have every reason chivracq, , sorry.

Code: Select all

The imacro I'm working on a Windows XP, virtualized with VirtualBox.

The imacro is version 8.9.6 for Firefox in version 38.
What I look for is that the imacro work in Firefox, then run an .EXE file, which will perform automated jobs in Windows XP.
Ah OK, sorry, I had not noticed that you had replied, as quite a few new Threads were opened in the meantime...

OK, I think there are a few ways to do what you want...
1- If you (can) run your Macro from the Windows Task Scheduler, it is then possible to run another Task automatically a bit later, once you know for sure that the Macro must have finished its Job.

2- Using the iMacros Scripting Interface, you could have a main VB Script running your Macro with 'iimPlay()' (and checking for its Return Code to make sure it will wait until the Macro has finished) before launching your .EXE or calling some Batch File which would launch the .EXE.

3- You can launch your Macro from a .BAT File, and the .EXE after that. I am only not sure if the Batch will wait for the Macro to finish or if it will want to execute the following Statements as soon as (FF if not already running and) the Macro has started or if will wait until the Macro has finished. Hum, I think it doesn't wait... You can then add some WAIT Statement in your .BAT File corresponding to the Max Time your Macro can take to run completely. After WinXP, you can use the DOS Command 'timeout', for WinXP, you still had to use/misuse the 'ping' Command.
You can probably access the Clipboard from a .BAT File, in that case, you could divide the Total WAIT into several Conditional WAIT's based on the Content of the Clipboard and you can set the Content of the Clipboard from your Macro at a few "strategic" Checkpoints, where you know more and more exactly when the Macro will finish...

4- Another Method that I had tested about 2 years ago and that had worked, but I tried to retest it again a few months ago and it didn't work directly, but I didn't investigate any further, is to use another FF Add-on called 'External Application Buttons', create a Button on your .EXE (or a .BAT File launching your .EXE), that Add-on accepts Shortcuts on the Buttons and to call that specific Shortcut from your Macro using a Statement with the EVENT Mode (+ 'MODIFIERS') at the end of your Macro.
Mini-Problem last time I tried to get it to run again was that only 'ALT' + 1 Letter were valid for Shortcuts and many are already taken by FF Browser Shortcuts...

5- Hum, and maybe I should mention a Method which sounds a bit obvious, but which doesn't work (anymore), ah-ah...!, since FF14 I think, it's not possible to launch Executable Files like .EXE, .BAT, etc directly anymore from the Browser, as a Security Tightening, otherwise you could have launched your .EXE or .BAT File directly from iMacros using the 'URL GOTO=file:///...' Syntax. It works with .mp3's for example if you want some Conditional Sound in your Macro but not with Executables...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Dimar
Posts: 17
Joined: Fri May 01, 2015 2:57 am

Re: Is it possible to open a program or file with imacro?

Post by Dimar » Fri Jan 29, 2016 7:54 pm

Excellent. Thanks chivracq for the possible solutions, I have it clearer, I will review what is the best way for me.

Regards
Post Reply