Import Binary Data and Dialog Box
Moderators: JRL, Dorian (MJT support)
Sounds Good
I will try it this way. I will open my folder of images and create a matching script file and use include.
I still think it would be a nice option to have the compiler do it automatically. That is what it is doing with the Include File, it is just saving the end user from having to create them.
I compile my images because I found a user that changed them and was reselling one of my progams. My images have been reduced to a header and a line of text, because of the lines that have to be edited when I make a change. I would just change the font in the Dialog and only use the header, but the user may not have the font installed that I want.
I use an installer called Deploy Master and I would recommend it to others in a heartbeat. It is easy to use, it registers DLLs, (if need be) calls third party installers, (Dot.net vbscript etc.) it allows for about everything (different components\options to be installed) the list goes on and on and it sells for around $100 (I think, I purchased it years ago and it has free upgrades). The only thing it does not do is add icons to the Quick Launch Bar. The same company also makes a great Help File Creator.
I still think it would be a nice option to have the compiler do it automatically. That is what it is doing with the Include File, it is just saving the end user from having to create them.
I compile my images because I found a user that changed them and was reselling one of my progams. My images have been reduced to a header and a line of text, because of the lines that have to be edited when I make a change. I would just change the font in the Dialog and only use the header, but the user may not have the font installed that I want.
I use an installer called Deploy Master and I would recommend it to others in a heartbeat. It is easy to use, it registers DLLs, (if need be) calls third party installers, (Dot.net vbscript etc.) it allows for about everything (different components\options to be installed) the list goes on and on and it sells for around $100 (I think, I purchased it years ago and it has free upgrades). The only thing it does not do is add icons to the Quick Launch Bar. The same company also makes a great Help File Creator.
Using include files with variables other than SCRIPT_DIR
Modularizing as Marcus suggests is the way to go.
If you don't want all your include files in the same SCRIPT_DIR, there is a very simple workaround - ChangeDirectory. And YES, it works with compiled macros.
ChangeDirectory>%MyImages%
Include>IncludeImage1.scp
Include>IncludeImage2.scp
ChangeDirectory>%MyDLLS%
Include>IncludeDLL1.scp
Include>IncludeDLL2.scp
//Change back to main script directory
ChangeDirectory>%SCRIPT_DIR%
You can also have an include script which uses the same technique to include other include scripts in yet other directories.
Also, the new v11 script editor makes it much easier to switch between scripts, almost as good as and editor supporting multiple windows.
One thing I have not tried yet which may still be a problem - using the debugger or trace. You should be able put put breakpoints in your scripts to skip past the thousands of lines of imported binary info.
Gale
If you don't want all your include files in the same SCRIPT_DIR, there is a very simple workaround - ChangeDirectory. And YES, it works with compiled macros.
ChangeDirectory>%MyImages%
Include>IncludeImage1.scp
Include>IncludeImage2.scp
ChangeDirectory>%MyDLLS%
Include>IncludeDLL1.scp
Include>IncludeDLL2.scp
//Change back to main script directory
ChangeDirectory>%SCRIPT_DIR%
You can also have an include script which uses the same technique to include other include scripts in yet other directories.
Also, the new v11 script editor makes it much easier to switch between scripts, almost as good as and editor supporting multiple windows.
One thing I have not tried yet which may still be a problem - using the debugger or trace. You should be able put put breakpoints in your scripts to skip past the thousands of lines of imported binary info.
Gale
Dialog Bitmaps
Thank you for your suggestion.
What I am trying (I will see how it goes) is placing the Include Scripts in the same folder as the images with the same name. I have a bunch of them and this way hopefully they will be easy to manage. (bunches of very small images, which I will continue to import - I can live with 500 lines)
Most of the bitmaps I use are just a couple of words, I use a standard color background in the dialog “Whiteâ€
What I am trying (I will see how it goes) is placing the Include Scripts in the same folder as the images with the same name. I have a bunch of them and this way hopefully they will be easy to manage. (bunches of very small images, which I will continue to import - I can live with 500 lines)
Most of the bitmaps I use are just a couple of words, I use a standard color background in the dialog “Whiteâ€
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
When data is imported it is put at the end of the script with an Exit> statement *above* it. This means that the debugger/interpreter will NEVER run over the imported data. Always put the data at the end after an Exit statement. It still gets recognised and used by ExportData and by the dialogs but it means you will never execute or step over it as the script will always terminate before it gets to it.One thing I have not tried yet which may still be a problem - using the debugger or trace. You should be able put put breakpoints in your scripts to skip past the thousands of lines of imported binary info.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Dialog and Include
Thanks for the tip, however, if I put the Exit>0 in an include script before the image it did not work.
My script containing the image only contains the image nothing else. I removed the Exit>0 before the text and it imported and ran fine.
On the ones that I am compiling I just have one Exit>0 which is where the code ends and the images begin.
My script containing the image only contains the image nothing else. I removed the Exit>0 before the text and it imported and ran fine.
On the ones that I am compiling I just have one Exit>0 which is where the code ends and the images begin.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Works for me. The importer even adds the Exit for you.
This works for me. The image shows in the dialog and is exported to the file. And if you debug it the debugger stops at the Exit statement.
Obviously you'd always want to make sure all your binary data was at the end.
Oh wait - I see when this wouldn't work - if using includes. Of course. It would stop the includes from working. You'd need to execute them to make the script suck in the file.
This works for me. The image shows in the dialog and is exported to the file. And if you debug it the debugger stops at the Exit statement.
Code: Select all
Dialog>Dialog1
Caption=Dialog1
Width=445
Height=250
Top=205
Left=231
Image=FOUND.BMP_DATA,48,40,105,105,msImage1,0
EndDialog>Dialog1
Show>Dialog1,r
ExportData>FOUND.BMP_DATA,%SCRIPT_DIR%\new.bmp
Exit>0
FOUND.BMP_DATA:
424D8E0900000000000036000000280000001A0000001700000001002000000000005809000000000000000000000000000000000000EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDD
AD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDBD400EFDED700F1E2DC00F2E5E000F3E6E200F3E6E200F2E5E000F1E2DC00EFDED700EDDBD400EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300ED
DAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD400EEDDD600F2E3DE00E3BCB100D38F7B00C2644A00B7462600B7462600C2644A00D38F7B00E3BCB100F2E3DE00EEDDD600EDDAD400EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300E
DDAD300EDDAD400EFDED800EBD3CA00D5927C00B9492300B6401A00B6401A00B6401A00B6401A00B6401A00B6401A00B9492300D5927C00EBD3CA00EFDED800EDDAD400EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EEDDD600ECD3CA00D0836800B9431900B9431900
B9431900B9431900B9431900B9431900B9431900B9431900B9431900B9431900D0836800ECD3CA00EEDDD600EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDBD400F2E3DE00D7957B00BC471900BC471900BC481A00D2866800E5B9A800F0DCD400F0DCD400E5B9A800D286680
0BC481A00BC471900BC471900D7947A00EFDFD900EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EFDED700E7C0B000C2532200C04B1900C04C1A00DDA08600F3E6E200EFDFD900EEDCD600EEDCD600EFDFD900F3E6E200DDA08600C04C1A00CA683F00EACBBD00EFDDD700EDDAD3
00EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300F1E2DC00DC9A7A00C4501800C4501800D78C6700F3E6E200EEDCD500EDDAD300EDDAD300EDDAD300EDDAD300EEDCD500F1E3DE00E5B9A400F1E2DC00EFDED800EDDBD400EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD
300EDDAD300EDDAD300F2E5E000D2774800C8541800C8541800E8BDA700EFDFD900EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDBD400EEDCD600EEDBD500EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300F3E6E200CE612400CC591800CC59
1800F2DDD400EEDCD600EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300F3E6E200D2662300D05E1700D05E1700F2DED400EEDCD600EDDAD300EDDAD300EDDBD400F0D
FD900F2E5E000F4E8E300F4E8E300F4E8E300F4E8E300F4E8E300F2E4DF00EFDDD700EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300F2E5E000DB824700D4621700D4621700ECC2A700EFDFD900EDDAD300EDDAD300EEDCD500EAC4AD00D4621700D4621700D4621700D4621700D4621700D4
621700D4621700F2E4DF00EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300F1E2DC00E7A67900D8671600D8671600E49A6500F3E6E200EEDCD500EDDAD300EDDBD400F0E1DB00F0CDB700D8671600D8671600D8671600D8671600D8671600D8671600F4E8E300EDDAD300EDDAD300EDDAD300E
DDAD300EDDAD300EDDAD300EDDAD300EDDAD300EFDED700EFC9B000DD711F00DC6B1600DC6C1700EBB08500F3E6E200EFDFD900EEDCD600EEDDD700F3E6E100F3D2BC00DC6B1600DC6C1700DC6B1600DC6B1600DC6B1600F4E8E300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDBD400
F2E3DE00EBAC7A00DF6F1600DF6F1600DF701700E8A06500F0C6A700F3DFD400F3DFD400F0C7A700E8A06500DF701700DF6F1600DF6F1600DF6F1600DF6F1600F4E8E300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EEDDD600F1D9C900EAA16500E2721500E2721500E272150
0E2721500E2721500E2721500E2721500E2721500E2721500E2721500E2721500E2721500E2721500F4E8E300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD400EFDED800F1D9C900EEAE7900E67B1E00E5751500E5751500E5751500E5751500E5751500E5751500E67B1E
00EEAE7900F2C9A700E5751500E5751500F4E8E300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD400EEDDD600F2E3DE00F2CCB000EFAF7800EB924500E87E2100E87E2100EB924500EFAF7800F2CCB000F2E4DF00F2E3DE00F4D1B600E7771500F2E5E000EDDAD
300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDBD400EFDED700F1E2DC00F2E5E000F3E6E200F3E6E200F2E5E000F1E2DC00EFDED700EDDBD400EDDBD400F0E1DB00EFCAAD00F0DFD900EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDA
D300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDBD400EEDCD500EDDBD400EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDD
AD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300ED
DAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300E
DDAD300EDDAD300EDDAD300EDDAD300EDDAD300EDDAD300
Oh wait - I see when this wouldn't work - if using includes. Of course. It would stop the includes from working. You'd need to execute them to make the script suck in the file.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Dialog
That is what I was doing a poor job of explaining. On an include with just a bitmap, it exits before the bitmap is read (I think). I do know if you just have a bitmap (nothing else) and use include you cannot have the Exit>0 before it.
- Phil Pendlebury
- Automation Wizard
- Posts: 543
- Joined: Tue Jan 16, 2007 9:00 am
- Contact:
Please note that currently, importing multiple bitmaps leads to multiple instances of "Exit>0" - One before each bitmap block.
Presumably this is not a problem but presumably also only the first one is required.

Presumably this is not a problem but presumably also only the first one is required.



Phil Pendlebury - Linktree
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Correct.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?