Miliardsto Posted September 25, 2018 Posted September 25, 2018 I got that func Func makeHelpImgGUI($title,$width,$height,$img) $img = GUICtrlCreatePic("",20,40,$width,$height) _ResourceSetImageToCtrl($img, "HERE") EndFunc and I call this func like that makeHelpImgGUI("Image",1190, 800,$SETTINGS_JPG) so what is the problem in the parameter where is - "HERE" I need value of img but passed as string so $img = $SETTINGS_JPG and how make it "SETTINGS_JPG" I tried something like that but not work Func makeHelpImgGUI($title,$width,$height,$img) $name_str = String($img) $name_str = StringTrimLeft ($name_str, 1 ) $img = GUICtrlCreatePic("",20,40,$width,$height) _ResourceSetImageToCtrl($img, $name_str) EndFunc
Zedna Posted September 25, 2018 Posted September 25, 2018 Maybe try _ResourceSetImageToCtrl($img, Eval($name_str)) instead of _ResourceSetImageToCtrl($img, $name_str) Miliardsto 1 Resources UDF ResourcesEx UDF AutoIt Forum Search
Miliardsto Posted September 25, 2018 Author Posted September 25, 2018 9 minutes ago, Zedna said: Maybe try _ResourceSetImageToCtrl($img, Eval($name_str)) instead of _ResourceSetImageToCtrl($img, $name_str) not work Report post do not know what to do with this . xd
Moderators JLogan3o13 Posted September 25, 2018 Moderators Posted September 25, 2018 Read it, perhaps? And "not work" is about as little information as you could possibly provide. How about you help us help you by A: putting forth some actual effort and B: if something doesn't work, explaining what exactly you're seeing? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
spudw2k Posted September 27, 2018 Posted September 27, 2018 Can't you just pass a string to begin with and not have to worry bout converting a variable name into a string? makeHelpImgGUI("Image",1190, 800,"SETTINGS_JPG") Func makeHelpImgGUI($title,$width,$height,$img_name) $img = GUICtrlCreatePic("",20,40,$width,$height) _ResourceSetImageToCtrl($img, $img_name) EndFunc Also, you don't use the $title variable in the function you shared, You should remove it if it is not necessary. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
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