Exe. Portability

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
delta1
Junior Coder
Posts: 26
Joined: Wed Dec 16, 2009 11:23 pm

Exe. Portability

Post by delta1 » Mon Dec 21, 2009 8:47 pm

Hi, I haven't yet done any compiling, but a couple of questions come to mind. I want to make exe's that are portable so I think I need to avoid things like OCR/MODI and image recognition (has to retrieve a bitmap from hard drive).
Can anyone discuss/add to these issues and can a bitmap(s) be embedded?
And what is a console app?
Thanks.

User avatar
JRL
Automation Wizard
Posts: 3518
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Dec 22, 2009 5:34 am

If I understand MODI it requires the client to have Microsoft Office, so yes for portability outside your sphere of influence that would be a good thing to avoid. But Macro Scheduler has some built in text capture tools: GetTextInRect>, GetTextAtPoint>, GetWindowText> and GetWindowTextEx>. Any of these OCR like tools will be as portable as the exe.

As for image recognition, that's a Macro Scheduler strong suit. Not only does Macro Scheduler have excellent Image recognition tools: FindImagePos> and WaitScreenImage>. It also has the ability to embed images or image files for use as image recognition needles. Look in the editor under the "Tools" menu. Also, see this blog http://www.mjtnet.com/blog/2009/02/13/i ... -mistakes/

A console app reads and writes to a command prompt. A DOS window for example.

delta1
Junior Coder
Posts: 26
Joined: Wed Dec 16, 2009 11:23 pm

Post by delta1 » Tue Dec 22, 2009 11:12 pm

I am using the getext and its working very well except for one instance where only image recognition will work. I assume the image gets embedded when the file is compiled. Thats great! Thanks.

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Wed Dec 23, 2009 5:47 am

delta1 wrote:I assume the image gets embedded when the file is compiled. Thats great!
Hi delta1,

Yes, its one of my favorite features as well. If you want to read more about it, check out this link:

[Done] Option to include image file data within compiled exe

Take care
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

delta1
Junior Coder
Posts: 26
Joined: Wed Dec 16, 2009 11:23 pm

Post by delta1 » Thu Dec 24, 2009 7:09 pm

Thanks, jpuziano.
I have another question. I have made a macro consisting of 3 smaller macros.
Main Macro
.Call Macro1
.Call Macro2
.Call Macro3
End
The reason I didn't use subs is that I wish to use macros 1,2,and 3 individually as well. Will this compile as if I had used subs? Or should I copy all the code into one macro? (oops thats 2 questions)

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Thu Dec 24, 2009 8:18 pm

Hi Delta1,

I am thinking you should read up on the Include> command... though you didn't say if you wanted to use the individual macros compiled or non-compiled.

Also, will you be modifying the 3 smaller macros over time?

When you compile the larger macro (made up of the smaller ones), you can click a checkbox to specify whether you want static or dynamic includes.

To understand what that is all about, please read this post: Include function and compiling

Also, if you have any opinions on the ideas presented there, please jump in and post your thoughts.

Thanks and take care... and Merry Christmas to all!
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

delta1
Junior Coder
Posts: 26
Joined: Wed Dec 16, 2009 11:23 pm

Post by delta1 » Sun Dec 27, 2009 4:16 pm

Yes, I will probably be modifying the smaller macros from time to time. I will also be running them compiled (for portability).
I think I will have to experiment and see what the implications are.
Thanks for your help.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts