Import binary

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
nick
Newbie
Posts: 6
Joined: Sun Apr 05, 2009 9:06 pm

Import binary

Post by nick » Sun Apr 12, 2009 8:21 pm

Hey people i need to import about 10 images into a exe and then export them to the temp folder and then access them from that folder.

i have

Code: Select all

ExportData>1.BMP_DATA,%TEMP_DIR%1.bmp
ExportData>2.BMP_DATA,%TEMP_DIR%2.bmp
ExportData>3.BMP_DATA,%TEMP_DIR%3.bmp
ExportData>4.BMP_DATA,%TEMP_DIR%4.bmp
ExportData>5.BMP_DATA,%TEMP_DIR%5.bmp
ExportData>6.BMP_DATA,%TEMP_DIR%6.bmp
ExportData>7.BMP_DATA,%TEMP_DIR%7.bmp
ExportData>8.BMP_DATA,%TEMP_DIR%8.bmp
ExportData>9.BMP_DATA,%TEMP_DIR%9.bmp
ExportData>10.BMP_DATA,%TEMP_DIR%10.bmp


FindImagePos>%TEMP_DIR%1.bmp,SCREEN,40,0,Xpos,ypos,img
if>img>0
         wait>1.00
         goto>
endif


/*
1.BMP_DATA:
424D9E010000000000003600000028000.................

Am i doing this correctly because i cant seem to get all the images working


[/code]

ainterne
Junior Coder
Posts: 29
Joined: Tue Jun 05, 2007 4:03 am

Post by ainterne » Sun Apr 12, 2009 9:59 pm

Hi,

Notice the form of the variables for the positions at the mouse move command from the array's.
Also it goes without saying that the images have got to be visible.


Code: Select all

ExportData>1:GREENLIGHT.BMP_DATA,%TEMP_DIR%GREENLIGHT.BMP_DATA.bmp

FindImagePos>%TEMP_DIR%GREENLIGHT.BMP_DATA.bmp,SCREEN,0,0,X,Y,NumFound

if>NumFound>0
MouseMove>X_0,Y_0
    MessageModal>Image found.
Else>
    MessageModal>Image not found.
endif

1:GREENLIGHT.BMP_DATA:
424D2604000000000000360000002800000012000000120000000100180000000000F0030000130B0000130B00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5E5E5BCBCBCACACACBCBCBCE5E5E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFE0E0E087A69
351AA823FBB8A3CC2903FBB8A51A98287A692E0E0E0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFB1B5B141B38235E3AA46F5CD4DF8DC50F9E04DF8DB45F4CC34E1A841B381B1B4B1FFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFADBBAF31C98B42F4C650F7E156F8EA57F9EC57FAED57F9EC55F8EA
50F7E040F3C330C888ADBBAFFFFFFFFFFFFFFFFFFF0000FFFFFFD9D9D939C58840F2C34EF5DC51F6E151F6E251F6E251F6E251F7E251F6E251F6E24EF5DC3FF1C038C485D9D9D9FFFFFFFFFFFF0000FFFFFF71BA9435EDAE48F2D14AF3D64AF3D54BF3D64BF3D64BF3D64BF3D74AF3D64AF3D54AF3D647F2D033ECAA71B893F
FFFFFFFFFFF0000CACACA37D08C3CEEBC45F0CA44F0CA45F0CB45F0CB45F0CB45F0CA45F0CB45F0CB45F0CA44F0CA44F0CA3CEEBA36CF88CACACAFFFFFF000078B8932BE0943BECBA3EEEBD3EEEBF3EEEC03EEEC03EEEBF3EEEBF3EEEC03EEEC03EEEBF3EEEBE3EEDBE3BECB92AE0907CB794FFFFFF00004DC38129E39637EA
B037E9B138EAB338EAB338EAB338EAB338EAB338EAB338EAB338EAB338EAB338E9B136EAB027E3944EC181FFFFFF000044C97F25E28F31E7A532E7A632E7A632E7A632E7A632E7A632E7A632E7A632E7A632E7A632E7A632E7A631E7A424E28D47C77EFFFFFF00005FC78A1FE0822AE4992BE49B2BE49A2BE49A2BE49A2BE49
A2BE49A2BE49A2BE49A2BE49A2BE49A2BE49B2AE4981EDF8163C58BFFFFFF0000AACFB81FD97623E18B25E18E24E18E23E18D23E18E23E18E24E18E24E18E23E18E23E18D24E18E25E18E22E18A20D875AFCEBAFFFFFF0000FEFEFE48CF801ADF7A1EDE821BDE822FE08A35E28F35E18F36E18F36E28F36E28F30E18C1DDE82
1EDE8117DF794FCD80FEFEFEFFFFFF0000FFFFFFB7D7C211DB6711DB7148E28F5DE69F5CE69E5CE69E5CE69E5CE69E5CE69E5DE69F4EE39413DB7212DA66BAD7C4FFFFFFFFFFFF0000FFFFFFFFFFFF79CF9605DB617DE9AB84EBB183EBB182EBB182EBB182EBB182EBB183EBB181EBAF1ADB6781CE98FFFFFFFFFFFFFFFFFF0
000FFFFFFFFFFFFFDFDFD8AD49E7FE5A0B4F5CEAFF3CAADF2C9ADF2C8ADF2C9AFF3CAB3F5CE8AE8AA94D4A4FDFDFDFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFCFE6D4AAE1BBC9F0D7D7F7E3D9F8E4D8F6E3CCF1D9B2E3C2D3E5D8FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFF8FAF9C1DFC9AEDCBDB6E3C5B3DCC1C6E0CEF9FAF9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000

Phil.......

nick
Newbie
Posts: 6
Joined: Sun Apr 05, 2009 9:06 pm

Post by nick » Mon Apr 13, 2009 2:56 pm

Hey mate can you go into a little more detail what im trying to do is enter more than 1 image for export.

ExportData>GREENLIGHT.BMP_DATA,%TEMP_DIR%GREENLIGHT.BMP_DATA.bmp
ExportData>GREENLIGHT2.BMP_DATA,%TEMP_DIR%GREENLIGHT2.BMP_DATA.bmp
ExportData>GREENLIGHT3.BMP_DATA,%TEMP_DIR%GREENLIGHT3.BMP_DATA.bmp
etc.....
is this the way to do it because it doesn't seem to be working it only works for the first export the rest don't work.

ainterne
Junior Coder
Posts: 29
Joined: Tue Jun 05, 2007 4:03 am

Post by ainterne » Wed Apr 22, 2009 8:35 pm

Nick, sorry I havent replied sooner but I did find that the same was happening for me. I contacted Marcus and he confirmed there was a small error in the that function that he is about to release.

The reason why was hard to spot or notice is that most people import the binary and then call it from inside MS rather than export it again before use. So its really not often that it would be used this way. However there no doubt are occasions and it needs to work as expected.

So hold up a few days and I believe the fix will be released.

Phil.
Phil.......

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

Post by JRL » Thu Apr 23, 2009 5:23 am

For an explanation of a method to embed files into a script then write the files out to the hard drive when the script is run, see this blog post. Using the method described in the blog, any file(s), large or small, can be embedded into a script for later use.

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