Picture for a button

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

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

Post by jpuziano » Mon Aug 24, 2009 3:05 am

Bob Hansen wrote:Kudos to JRL for his high quality work.
Ditto... thx JRL for the great example.
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 - :-)

Zjaii
Newbie
Posts: 11
Joined: Fri Oct 15, 2010 3:48 pm

image date block

Post by Zjaii » Wed Oct 27, 2010 3:44 am

What is the easiest way to turn an image into a data block so I can include them inside my scripts?

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

Post by JRL » Wed Oct 27, 2010 4:27 am

The easiest way is to use the "Import Binary File" item under the "Tools" menu in the Macro Scheduler editor.

Using "Import Binary File" will automatically insert your file data in a label block that will look similar to the following. It is usually good to place the block at the end of the script so that it is out of the way. It could be quite large for some files.

Code: Select all

/*
FILENAME.BMP_DATA:
424D36241200000000003600000028000000AF020000400200...
*/
Then use the ExportData> function to write the data back out to a file. Something like:

Code: Select all

ExportData>FILENAME.BMP_DATA,%temp_dir%NewFile.bmp
Be sure to exclude the colon when you enter the label name as the first parameter of the ExportData> function.

Zjaii
Newbie
Posts: 11
Joined: Fri Oct 15, 2010 3:48 pm

Thank you

Post by Zjaii » Sat Oct 30, 2010 5:29 am

Greatly appreciated!

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