Sign in to follow this  
Followers 0
ConeXXion

Image embedded...

10 posts in this topic

Hi, ppl I need to set a background image to my application but if i change the name or the directory of the pic... my application does not get the pic... i tried to embed it but i dont know how......

can anyone help ? ;)

thanks..... :)

Share this post


Link to post
Share on other sites



Post some code up...let me see.. :)

Share this post


Link to post
Share on other sites

FileInstall ( "source", "dest" )

"source" = Current location of your image file

"dest" = Location you want the file extracted to so your script can find it


There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly

Share this post


Link to post
Share on other sites

FileInstall ( "source", "dest" )oÝ÷ Ú«¨¶Ê.­Çªº

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

:)

Thank you guys but i think i didnt explain myself correctly.... look, i am trying to do a tool to kill a virus called "Gullum" that infected some PCs here at work, i have no problem with the code but i want it to have a cool face to users so i put a backgroud image on it, the problem is that when people carry it for their PC the backgroud pic disappears because it lost the path i think, i want the backgroud picture inside the application....

this is the design.

PD: sorry about my english, i speak spanish.

post-26456-1189122471_thumb.jpg

Share this post


Link to post
Share on other sites

ofLight & Valuater are correct...you need to use FileInstall so anyone who runs your code on their machine will have the background pic....

Share this post


Link to post
Share on other sites

FileInstall() is really solution.

Amd you may look at alternative way how to embed data/pictures into EXE - resources

thank you folks.... i really appreciate your help..... i will work on that way.... better of... i have that solution. :)

Share this post


Link to post
Share on other sites

thank you folks.... i really appreciate your help..... i will work on that way.... better of... i have that solution. :)

Share this post


Link to post
Share on other sites

I think ConeXXion is talking about embedding the image into the code lik mrbond007 did here or like

the example I made for myself using what was done by mrbond007 but I cannot get the hex editor to work for me. If anyone else figures it out please pm me or post the example ..

Either way ConeXXion the image gets compiled basically by using fileinstall and gets placed in the %temp% folder then deleted when closed.

Local $pic = "0x"
$pic &= "FFD8FFE000104A46494600010101006000600000FFDB0043000101010101010101010101010101010101010"
$pic &= "1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
$pic &= "FFDB004301010101010101010101010101010101010101010101010101010101010101010101010101010101010"
$pic &= "10101010101010101010101010101010101010101010101FFC0001108002C005F03012200021101031101FFC400"
$pic &= "1E00000103050101000000000000000000000906070A00010405080203FFC4003A1000010401020206070605050"
$pic &= "00000000004010203050607110008091213142131154151617191F01632526281C1172253B1D123547292F1FFC4"
$pic &= "001B01000105010100000000000000000000000603040507080209FFC4002A11000300020201040201030500000"
$pic &= "000000102030405111213000607211431081522232425334161FFDA000C03010002110311003F009FC71A5B2B81"
$pic &= "C06EF248D6F9F8AAEDF3F77D7AB7E326C8B41477BD576EAB55577F86FF005E3FDB8059D201CF8E4FA7FAAD8DF2D"
$pic &= "7A473C75FA89798B8FA8D98E5C5C4190CC3B4E56F8DA48DB8E076429F51639D6466545B0B4D1DE08553D30C1CB6"
$pic &= "C7555DC6F881E07BDD5EE8D37B37479BEE2DF643636B70150D5A727BDAB5B51630C7C78CC16ADEF6749CD7E9416"
$pic &= "EF479CD5DD65F45A3D8FB8F698DA8D5456D9994CC103BACA6893534AD6B472152529AB3BB7D9E07545672AA4CDB"
$pic &= "B3AAE6C9D9A90CDF7DBEF37DA89F8FDFFE78DE0D94033351527678A6FB23D3C3DDF79388E4DD73152CD5167363F"
$pic &= "ACBCD732FBD1C5BE966B88795D229D96683BD407DA400E80085115A84A44A6C211431528DDA30622199D1C8D415"
$pic &= "EF4886B9E199960BA720D961198B73B0A9CA76A14B84E4B8CCD86B2AE00E5D4369DA74DCFAEA1CAE58E435B161A"
$pic &= "E875070C696E8C965940F41219ACEA89FF23BE3125FCFB0CEC4449B38A5F160EB57E94648497132F26AD5A99945"
$pic &= "266B147792DAD2F2CCB1DBFC3DEF5013C58B8B90CCE10A4AF556452D356AB9C8C784C4E7E40CC039A32AB99CE9D"
$pic &= "18094136F837377EDD9E5E1FCCCDBCBC9775DF7F6FF007E3447E655E33FAAE2234DBC3EF37F67227ABDBC009D3E"
$pic &= "E79355F22CE33DC16DF32D23A2AAC51A15A639A8991D46A1D22669456F39628224B81D1499B3F1DBCAC7569735A"
$pic &= "91366870870E556CE1D6D7F6F30F033587F393AB1A9B94E5B71A8B97E6B80E1C29A5D160F45A104E9CD94C5CD8E"
$pic &= "DA1B51777F925C6B0693E4E7D932F0C0E6368A0ABAFC55B574ED1613EBEC8B9A4B157393FC87F8B71F1F12E9BBB"
$pic &= "65D72ED48261E261D1F2254803F93E77A34B1273C7A75835FF29A16ABA0C5A6421EE1087C49EF7B5AF26D6CF1D2"
$pic &= "134AB6464642A4A89523C3E2540F90EF5426A25E0159CD58DD24C3A992D57E620192A3193B1CABE09B393F2FE65"
$pic &= "F6FD78F0B36170B988EEBB7C537F34FF3C45CB36E7D329E5DEE68F5146CAB54350B486A62959AB147AA83697B72"
$pic &= "9ABAB2091621728D392B4BB4FB026927D2A2CC4DB51646CB31AEABD928E0114C5B7D251120D66E903C3744744F2"
$pic &= "AD63B779575498CD0C16D0014EAD90FBD2ACC916BA86AEB95EF6C6935D5AD8D7003CF27FA50A9693488AC63914C"
$pic &= "3DA3F26FB47DEB81B9D869F39D63A06FF765CC98853124718E52E5378E9695315E296EB68D68A1E179B057995F4"
$pic &= "3FBFF0065EFFDB795AEC4D8632B536C3FD0363B9AA6453CC20623B2CDD2CB479F33A221EB5938E55C1F4574CB91"
$pic &= "06639CB2B536DFCDC88BF14F1DFEBDFC2464CE6B9B2F67DE23F3DB6EB377F3FF0097ABE5F3F08F7EBE748E6B363"
$pic &= "FA2D539E6186689D96619B938A51D761F15B6A5946E9E9F9C4E28435BDD986E15575B998989946322B402B971D9"
$pic &= "2D158A4853318CEE736BAA39937AD5D44B91EB1F362B91C95C2BEDD2AA3E56A1AD7DB3478BD27E8A80BE5FA725A"
$pic &= "034C591058C8988223816161134B2F59EE0DCEFE44FC5D8969C63B8BEC8D20B9069838BFE292504DA4B4A66D70C"
$pic &= "792A945759CFC8CA3B2D44DD4A022C6F88BDEF79BD29AF96185AB482655FFC94642CB4645C69E4FF00623295676"
$pic &= "EAA4F050B2B063247ACBD18F46F67235DBA2793917D9EC55DBEBDDC287CF8045D1B9CECE6BACF996AE68CEA5234"
$pic &= "CCCF47AC71C2C6CAA18A11BED76139C7A7A5C5CCB708106BAAC2CB2ABD007D564DE89080A5B02A286CA9ABC310A"
$pic &= "51603A81CBDA8F1BFD6AD4DF8B57DB5EE2D57BB745ADF71692ED91ACDAE3FE462D1E6D2A001DE559D66DF6958DA"
$pic &= "748D57960288DD59D78620BB9D4676876999A8D94D659B835F15D15C5139645A4DD1D7E9A7493A510F009571D95"
$pic &= "5B9509ACA6456033EDF85FB7FD5DEEFD7F4E222FCFB3D5DD27AC4FF0071CA6E1CE7AA78755D1EA96AEC6D4DFC15"
$pic &= "1DD54454F77C13697864623880E66B537DDAEF9AA2EDEA55FF00C5F1E22ADD211A559451F480E3BA976A2482615"
$pic &= "99E8251E9DE2F74B14B20F639ED16799CDC1B883656224505B974F9285675504EE492D6286C220639E60496B29F"
$pic &= "FE4BC2D7F897722327A996CB436A745244E49B6C5EF573C7F6A2723B31FA0481FF007EAC2F862B397BFB5C69459"
$pic &= "87C3DA4D7B103BBB60DBAA2F3FB66E09007D900F1E87DE5BCD3E7D886B25072E60D260666339C93465CB95D963E"
$pic &= "F2338C7C122BF2C2AE29AA2DFBDC60F74B3928ABFA93175961635D011643D7183C8405E8CE8C9309A6B7B5A8CA4"
$pic &= "C8C996E689960354111123435E221AF8A4290F1E5AA98C26570F1A443A8B641C10CAF7484C652A44AC7C26D1EC8"
$pic &= "EBF16BB82CB4371990B35E2DC58E737DA6821798D3CB4B0CFDC4EAFCECB865BCC7C4A5188395A3D54E05520E65B"
$pic &= "77D1668AD2D5C5F3B66A067988EACE99E1125A97521E675863ECB148EE488C7BE20DEE67E18F32AC035E0DA4B60"
$pic &= "4219F67642A225EC2213DD1A04E85D2F1E776D7033249AC6CAD7EC2A90D76362D16D8B9204F30E7ECB264E17207"
$pic &= "45098D5C791A270D34C3A5517AE3A9F5AE7072B1A8D99F8F958937AE65AE8676892F8FF0089851752D12589369D"
$pic &= "5FA30E1DB25158F343EB1AA24466A264D02AA2B998CE2723E5491CD63D127BD62B118D635FD54D9FDB39AF7239B"
$pic &= "23588D4D955F93A58D7CB4DDA8E4C82B9722CACB854490494D8DC993D8CF1C713EC6ACFAB92463376CCDB3A9280"
$pic &= "9157B136BE689D388AE0E27A557F6BAB5A838D47698B56DEE358FE2B0DD55DD649534E5D74CA55FB2316661F3C7"
$pic &= "1BE69236C2448D19F336210C165497B49118C6C87A0C8ABF48B52728C6EE2057E1F9066159265149653361AACB0"
$pic &= "BC86C8AA7102B615F092E3C8954292BCDADED207CC5852466C492365E2165ACDA633C7269AECC592D77C471175A"
$pic &= "16C4C99D32151CF0CB4824AB47520740AECFC2C89120F9B8565A4532F1D9D935439F2295E3222522587DA94AB3A"
$pic &= "2A907EC90ABC9700B877589E379710DABD41C6DB9CE136A6B64BCC48EBA329BED0574C85CE94C7DA63B1D498189"
$pic &= "3BA48185A5036AE550622A1AD75623E096143F37D5D89E65CB5E7D478FE026E085D10E7662CB68F57F5A326AF75"
$pic &= "4615393950B8F9D8EE73A857B8E4D571435A0C45992852C95E958EB5AC1832201E08C83E8468273119E60BA3BA8"
$pic &= "5AAFA8F9B576ACD669FD43ACE21B1BD2EAF8A8ADF21A105D95D5CB4DFC38756CA438B8E280A71E29A500400B156"
$pic &= "1634339A86351D203CBAEBF9FCB0EA503519CE7D9DCD5F1555FAE2E941A6E2C9695C06455C4E483A498BE9F50DD"
$pic &= "111331A75E4E95E35946D33A8824AC9C77A8CFD5B0F823E41D16976F9B879B18E3DF0ADB1ACD3175CD9F7C69E12"
$pic &= "5698F7B50DB618794C13260B8D8472D025508715CBCBC785194F947DA5B3D96BF1B231AB4ACB267888EF6CB18B2"
$pic &= "B36499ADA534F1E264414B4AAD6C8F03169B0EA5218F6A8C7E656F8DC7F41AAACEAA551AC9975A78A0588F33E5F"
$pic &= "461AB774C80D8F69128EAE883316099D24728EF6A35CF6C9D6ECDBC29F4E75832CCCB412BF57ACA2AC6E56987CD"
$pic &= "67009595E20D58C36B4289A2C03D4F762079079640E259E13233A73D92C8E36638A26622455F331A199A643CB18"
$pic &= "226392E2F90D866F1E15578C525164D4F6973646DBCA2F778E1AB12794A4ECA264A518F58FAA20B04E44CAD8E27"
$pic &= "AA63685E8AE600F27D1116E463B8F1B8A6276F4790D05E64551579055DCD244F02DAAEC294A223B21EC462637C1"
$pic &= "DD16059A591FD458D55CC5E332FF0041DC4FDBD3B4F4FB019233322AD9139DD55F1A5A2D75E3121009878B79326"
$pic &= "54EC6C05D8CC2AFDB5D2369AE6DB34DF63886271A28B2679315B536B952A382C4BF5A0F1C68BC0913301893FA30"
$pic &= "5D139868A6E9BE33AD161DD8ECEB5BF19C4738CC6DC7892085DDEA9BBE5263B5E3F693A81478A0D684D75657290"
$pic &= "4BC57CA6BA426692791FC4846BD9D41224FCA9ECFDB80C5D14FA3D98E97F2B1A0D8D66D4C4D164D59A7F4FE97A8"
$pic &= "3237C4656926B65B06866C1231928C70F097146609335938853661A6632589ED69A215AAC8236AFA9138F5CFDA5"
$pic &= "AEC4D4FB6341AFC1C29EBB1B1B5382A98539F8841DF1D2B70E842B1B3DDE94BBD0796B77A52A4D1DC9C03BECBBE"
$pic &= "7EEB6B979392F996B67E496C977EE6AAB5649156E4813592A24954F4492A24F845503E92C6D958E63911515153C"
$pic &= "7DFF5F3DB8E62D6BD0FC6B542A49A5C928EBEF2B4896021C2580B193130B0C861609B07688AF14FAF32284DAE3C"
$pic &= "67446579B0406073C24C314ADEA1E3C3A363FC1CD477C789DACA579D2369CED1AA34EB2AA2D2749B82AF3A4DC15"
$pic &= "74752559581560482083EA2D1DE4E949BB4E936574A231474752195D19486565201560410402083E85B58727F58"
$pic &= "6C52D790974457CF1F772059F23C86788919C8D64901292DABD4986666F1931CEB23098DEF8C849639646BF22B3"
$pic &= "922D34029CCA11B4F30D1696C5C1BEC69E0C62921AA3E4AF585C0C86D7C4134429E13871DC23E786470CB042B0A"
$pic &= "B1638D509DF741FF00A69C7A41A144DBA89F2E2331F41A2C4677C4D26A315E926851F1F5B870678BAB2BC5DA515"
$pic &= "2D26566569B128CACC08209E5EDB6BB4C8555BECB3EEA8E2A8B6CCC8A2AD1482B450F460AEA554871C3020107E8"
$pic &= "7A1C75DC9EE0B5A136B40C331B0EB584CE632BC4A3AB18261852AB89298242332069043BF9A79D234965778C8E7"
$pic &= "2F8F1B40B940D3BFB4A265456098991918930930F7E463B513DD0F204C4883921B590471D13C48956219D190D74"
$pic &= "11AAB2256B576E084F7787FA6DF9717482145DD236A2F0F3F0307C7297E16278A262D19FE347C726C6E3F1DA49D"
$pic &= "3ACCE3F03C250032E078FAF03D37FCACAEEF4FC9BF7A8A0A3F9A9DE82DFF3076EDCB8AF27C81890FCFF00773E9B"
$pic &= "4C6B01AEAC1191F778F76B5136EAA6DE4BEFF3F1F6F157BA7F5B611B9AA346A8A9EB6EFF00BEDEBF3E1CF44444D"
$pic &= "91364E2FC3BF487AE3C3F977C67BF1278B455839A5ABD4932000584A256491B2BD482238DB2CAAF7A23DFDA3DCA"
$pic &= "E7B51EEDD51178F8D5F2ED8CC1690DAC943572D88EADEC4F90015E645D4D919D994E8D678FAA8AE46F5644DBACE"
$pic &= "4454DD77EC6ECE3FC29C52451A2EE8C6A2FC384FC52E02F8A7D43770BD1780FFBEE071C06E7EFB7EFFF007D77E4"
$pic &= "7E79EEFC95EA4F63CF5FD75E79E7AF1F5C7EBD2131AC547A8631B1C4D6EC89E49B796DF1FD3F4DB7E17A888D444"
$pic &= "4F244DB8BEC89E49B715C29EB8F5FFFD9"

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$AForm1 = GUICreate("Embedded Image Example", 310, 130, 193, 125)
$MenuItem1 = GUICtrlCreateMenu("File")
$Exit = GUICtrlCreateMenuItem("Close", $MenuItem1)
GUISetState(@SW_SHOW)


$Label1 = GUICtrlCreateLabel("Embedded Image:", 8, 16, 199, 27)
GUICtrlSetFont(-1, 14, 800, 0, "Verdana")
$Label2 = GUICtrlCreateLabel("Embedded Button:", 7, 63, 203, 27)
GUICtrlSetFont(-1, 14, 800, 0, "Verdana")


GUICtrlCreatePic("1.jpg", 200, 0, 200, 80)
FileWrite(@TempDir & "\chip.jpg", Binary($pic))

GUICtrlCreatePic(@TempDir & "\chip.jpg", 210, 5, 95, 44)
GUICtrlSetState(-1, $GUI_DISABLE)

$but1 = GUICtrlCreatePic(@TempDir & "\chip.jpg", 210, 57, 95, 44)
GUICtrlSetCursor(-1, 0)

FileDelete(@TempDir & "\chip.jpg")


#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Exit
            Exit    
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0