Swimming_Bird Posted July 5, 2005 Share Posted July 5, 2005 (edited) In order to make the pics go with me i made this code#include "image_get_size_jpeg.au3" $plainpic = @tempDir & "Sigstuff\Plain.jpg" $openpic = @tempDir & "Sigstuff\06open.jpg" $invpic = @tempDir & "Sigstuff\inv_conf_05.jpg" FileInstall ( "Plain.jpg" , $plainpic , 1 ) FileInstall ( "06open.jpg" , $openpic , 1 ) FileInstall ( "inv_conf_05.jpg" , $invpic , 1 ) ;gets the image's resolution $PlainSize = _ImageGetSizeJPG( $plainpic ) $OpenSize = _ImageGetSizeJPG( $openpic ) $InvSize = _ImageGetSizeJPG( $invpic ) $tab=GUICtrlCreateTab (-1,-1, 2000,1000) $tab0=GUICtrlCreateTabitem ("Template") ;this tab has the user select the template they wish to use for their signature. $plain = GUICtrlCreateRadio ("Plain", 8, 40, 50, 20) $fbropen = GUICtrlCreateRadio ("FBR Open 2006", 60, 40, 110, 20) $investor = GUICtrlCreateRadio ("Investor Conference", 175, 40, 130, 20) $plain_pic = GUICtrlCreatePic ( $plainpic , 25, 100, $PlainSize[0], $PlainSize[1]) $fbropen_pic = GUICtrlCreatePic ($openpic, 25, 100, $OpenSize[0], $OpenSize[1]) $investor_pic = GUICtrlCreatePic ($invpic, 25, 100, $InvSize[0], $InvSize[1])and i get this errorC:\Documents and Settings\tatlas\Desktop\Signatures Autoit\prelim script.au3 (44) : ==> Subscript used with non-Array variable.: $plain_pic = GUICtrlCreatePic ( $plainpic , 25, 100, $PlainSize[0], $PlainSize[1]) $plain_pic = GUICtrlCreatePic ( $plainpic , 25, 100, $PlainSize^ ERRORit works fine when i just run the images from the script directory, i cant confirm if it is installing the files propperly though.Thx for even more help image_get_size_jpeg.au3 Edited July 5, 2005 by Swimming_BIrd Link to comment Share on other sites More sharing options...
Centurion_D Posted July 5, 2005 Share Posted July 5, 2005 looks like you're defining the variable as an integer and not an array... $PlainSize = _ImageGetSizeJPG( $plainpic ) $OpenSize = _ImageGetSizeJPG( $openpic ) $InvSize = _ImageGetSizeJPG( $invpic ) are integers and you're trying to use them as arrays... If my posts or emails are not in the correct format, too bad! Technology is my territory!My Programming Page (I need members!):http://doublexlegion.gwgaming.net/ Link to comment Share on other sites More sharing options...
Swimming_Bird Posted July 5, 2005 Author Share Posted July 5, 2005 looks like you're defining the variable as an integer and not an array...$PlainSize = _ImageGetSizeJPG( $plainpic )$OpenSize = _ImageGetSizeJPG( $openpic )$InvSize = _ImageGetSizeJPG( $invpic )are integers and you're trying to use them as arrays...<{POST_SNAPBACK}>they are arrays cuz when i just change the pic dir to the script's dir (which has the pics in it) it runs fine. Link to comment Share on other sites More sharing options...
Valuater Posted July 6, 2005 Share Posted July 6, 2005 (edited) You state this FileInstall ( "Plain.jpg" , $plainpic , 1 ) Help states this FileInstall ( "source", "dest" [, flag] ) Parameters source The source path of the file to compile. This must be a literal string; it cannot be a variable. if you want to "Install files" what you used is ok, if the script and pics are in the same directory otherwise FileInstall(C:\mydirectory\plain.jpg..... this must be C:\...... not a variable FileInstall is for compiling a script, if you are just "running" as an AU3 it does a "file copy" routine... you can check this Hope it helps 8) Edited July 6, 2005 by Valuater Link to comment Share on other sites More sharing options...
Swimming_Bird Posted July 6, 2005 Author Share Posted July 6, 2005 basically i'm trying to figure out a way to "include" the pictures with my script when it is compiled. What i was planning on doing is installing the pictures to a temp directory and then reading them for the gui from there. Link to comment Share on other sites More sharing options...
w0uter Posted July 6, 2005 Share Posted July 6, 2005 maby i am wrong but shouldnt:$plainpic = @tempDir & "Sigstuff\Plain.jpg"be$plainpic = @tempDir & "\Sigstuff\Plain.jpg" My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Swimming_Bird Posted July 6, 2005 Author Share Posted July 6, 2005 (edited) i did have that error, but it after i fixed it it still didnt work The issue seems to be that i am unable to place the files in this directory Edited July 6, 2005 by Swimming_BIrd Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now