trung0407 Posted October 28, 2007 Share Posted October 28, 2007 How can u get the path of a as a GUI Control? Like $Pic = GUICtrlCreatePic("C:\pic1.bmp", 27, 54, 32, 32) How to get the "C:\pic1.bmp"? It's much easier when it's an object by accessing $Pic.Picture ?! Link to comment Share on other sites More sharing options...
martin Posted October 28, 2007 Share Posted October 28, 2007 (edited) How can u get the path of a as a GUI Control? Like $Pic = GUICtrlCreatePic("C:\pic1.bmp", 27, 54, 32, 32) How to get the "C:\pic1.bmp"? It's much easier when it's an object by accessing $Pic.Picture ?! There aren't properties in AutoIt like that. You will have to have a seperate variable for the path or make your own picture 'object'. For example you could have Const $PicPic = 0, $PicPath = 1, $PicName = 2, $LastPicElement = 2 $Pic = MyPic("C:\pic1.bmp", 27, 54, 32, 32,"Example pic") msgbox(0,'the path for picture ' & $pic[$PicName] & ' is',$Pic[$PicPath]) Func MyPic ($path,$left,$right,$wid,$ht,$name) Local $pp[LastPicElement + 1] $pp[$PicPic] = GUICtrlCreatePic($path,$left,$right,$wid,$ht,$Name) $pp[$PicPath] = $path $pp[$PicName] = $Name return $pp EndFunc Edited October 28, 2007 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
James Posted October 28, 2007 Share Posted October 28, 2007 I'm sure AutoIt doesn't accept "." in the variables Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
_Kurt Posted October 29, 2007 Share Posted October 29, 2007 I'm sure AutoIt doesn't accept "." in the variables .... He meant by using an object, did you even read his post? It's much easier when it's an object by accessing $Pic.Picture $obj = ObjCreate("blah") $obj.Action(1) Hope you were being sarcastic, really. Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
JustinReno Posted October 29, 2007 Share Posted October 29, 2007 Yeah, I agree with everyone else, its pretty much impossible to do. 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