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

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Option to include image file data within compiled macro exe

5. Important, even if the size/efficiency increases/degrades
14
70%
4. Somewhat important
4
20%
3. I'm okay either way
0
No votes
2. Somewhat unimportant
0
No votes
1. Unimportant, even if the size/efficiency remains unaffected
2
10%
 
Total votes: 20

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Apr 30, 2007 12:54 pm

From the Dialog topic of the help file:

"Images and Buttons can reference bitmap files, or bitmap data embedded in the script. To import bitmap data into the script use Tools/Import Bitmap Data in the editor. The bitmap data will appear below a label at the end of the script. Reference the label name in the Image/Button declaration of the dialog block in place of the filename."

If that isn't clear:

Dialog>MyDialog
.. bla bla
Image=BITMAP_DATA,10,10,200,200
EndDialog>MyDialog

bla bla

BITMAP_DATA:
71838543423487239487......

Import the bitmap and you will see the data appear at the end of the script beneath a label. Use that label name in place of the filename in your dialog definition.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

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

Post by JRL » Mon Apr 30, 2007 12:55 pm

Rain,
From Dialog help:
Images and Buttons can reference bitmap files, or bitmap data embedded in the script. To import bitmap data into the script use Tools/Import Bitmap Data in the editor. The bitmap data will appear below a label at the end of the script. Reference the label name in the Image/Button declaration of the dialog block in place of the filename.
Marcus,
Thank you for continuous improvements and outstanding support. I've been an administrator for 20 years and I've dealt with many software packages and software developers. You are unquestionably the most creative, the most cooperative and the most responsive individual I have ever had the pleasure to have worked with. This addition is another fine example of those qualities.
Thank you,
Dick

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Mon Apr 30, 2007 1:18 pm

Thank you Marcus and Dick I totally missed that part when I was reading that section. Maybe I shouldn't speed read before my 2nd cup of coffee :? One more question, this option only works with bitmaps, correct? I just tried a JPG and all I got was “1.JPG_DATA:â€Â

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Apr 30, 2007 1:20 pm

>One more question, this option only works with bitmaps,
>correct?

Correct. That's why the option is "Import Bitmap Data".

If you have JPEGs you want imported, convert them to bitmaps first. Then import.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

thaumaturgy
Junior Coder
Posts: 24
Joined: Mon Nov 01, 2004 1:30 pm

Post by thaumaturgy » Thu May 03, 2007 3:38 pm

Could some one give me a working example of this new feature. I'm not having any luck getting it to work....I'm sure I'm missing something simple but it's escaping my grasp. Thank you.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu May 03, 2007 3:41 pm

Try scrolling up the thread a bit. There's an example 5 posts back.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

thaumaturgy
Junior Coder
Posts: 24
Joined: Mon Nov 01, 2004 1:30 pm

Post by thaumaturgy » Thu May 03, 2007 4:43 pm

Thank you but that's what I've been looking at over and over again. That's why I was thinking a working example would help me.....I'm missing something simple but just can't see it.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu May 03, 2007 4:54 pm

Erm, not sure how to make it any clearer. Try this:

Code: Select all

Dialog>Dialog1
   Caption=Dialog1
   Width=164
   Height=177
   Top=191
   Left=111
   Image=S_DATA,24,24,105,105
EndDialog>Dialog1

Show>Dialog1,r

S_DATA:
424D7A010000000000003600000028000000090000000900000001002000000000004401000000000000000000000000000000000000D1767200D57C7400D9867600D88E7600DB8E7600DB937700DD95780080E0E00040A0E000D1767200D57C7400D9867600D88E7600D88E7600DB937700DB93770080E0E00080E0E000D27A7200D7847000D9897600D88E7600D88E7600DB937700DB937700DD957800DE997900D27A7200D8847500D9897600D88E7600D88E7600DB937700DB937700DD957800DE997900D0786B00D9897600D88E7600D88E7600DB937700DB937700DB937700DD957800DE997900CF6F5B00D7847000DB937700DD957800DD957800DD957800DE997900DF9D7A00DF9D7A00CA5E4800DC856500DB937700DF9D7A00E1A07B00E2A17D00E3A47D00E5A68000E5A68000984E0000CC635000DC856500DE997900E3A47D00E5A68000E8AB8500E7AC8A00E9B08B00984E0000984E0000CA5E4800D87D5E00DB937700E1A07B00E5A68000E5A68700E5A68700
Used a very small image here to avoid too much text on the forum.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu May 03, 2007 4:55 pm

To do it yourself:

1. Create a dialog with an image compont
2. paste it into a new script
3. add the Show> command so that it will show
4. Use Tools/Import Bitmap Data and import a bitmap file
5. You will see the bitmap data appear at end of script beneath a label
6. In place of the filename in the Image= declaration in the dialog put the name of this label.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu May 03, 2007 4:58 pm

You do have 9.1 don't you? This won't work with any thing less than that. This is new functionality introduced with version 9.1.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

thaumaturgy
Junior Coder
Posts: 24
Joined: Mon Nov 01, 2004 1:30 pm

Post by thaumaturgy » Thu May 03, 2007 6:19 pm

Thank you, Yes I do have 9.1. I appreciate your help very much. One last dumb question then I'll leave you alone. :) When you say use the label that's above the data, is S_Data the Label name ? Thanks again.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu May 03, 2007 6:32 pm

In my last example the label was S_DATA, yes. The label is derived from the bitmap's file name. mypicture.bmp would make a label called MYPICTURE_DATA
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

thaumaturgy
Junior Coder
Posts: 24
Joined: Mon Nov 01, 2004 1:30 pm

Post by thaumaturgy » Thu May 03, 2007 6:35 pm

Ok great....Thank you very much.

thaumaturgy
Junior Coder
Posts: 24
Joined: Mon Nov 01, 2004 1:30 pm

Post by thaumaturgy » Thu May 03, 2007 8:56 pm

mtettmar wrote:In my last example the label was S_DATA, yes. The label is derived from the bitmap's file name. mypicture.bmp would make a label called MYPICTURE_DATA
Thanks again, Got it. :D

DrPain
Newbie
Posts: 10
Joined: Sun Mar 26, 2006 2:38 pm

Post by DrPain » Wed Aug 01, 2007 3:02 am

I tried to use this new feature with the image function FindImagePos, and it returned a -1 as the number found. So I assume this means the image functions don't work with the embedded bitmaps. If this is the case, are you planning on adding this feature to the image processing functions? This would be extremely useful.

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