ezzetabi Posted January 17, 2005 Share Posted January 17, 2005 More than once I needed to manage windows list and doing this is very easy via strings. Handles ATM can't be stored in strings being a different type. Is it hard to convert a string to handle type? Probably it is not, I'd like to see a command that do so, after all commands to convert string to numbers already exists. Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 17, 2005 Administrators Share Posted January 17, 2005 More than once I needed to manage windows list and doing this is very easy via strings. Handles ATM can't be stored in strings being a different type.Is it hard to convert a string to handle type?Probably it is not, I'd like to see a command that do so, after all commands to convert string to numbers already exists.Why is it easier? Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
this-is-me Posted January 17, 2005 Share Posted January 17, 2005 @ezze, do you mean handles in terms of dllcall or just inside of autoit as a whole? Who else would I be? Link to comment Share on other sites More sharing options...
ezzetabi Posted January 18, 2005 Author Share Posted January 18, 2005 (edited) @this is me: I meant handle of windows . @Jon It is easier since strings can be concatenated (adding windows to the list), replaced (removing windows from the list), splitted (making an array for any mass operation) Arrays instead need resizing and removing from list force recoping all valuesto a position behind... Please, it is so hard? I guess it is more of less 10 lines of code... Edited January 18, 2005 by ezzetabi Link to comment Share on other sites More sharing options...
this-is-me Posted January 18, 2005 Share Posted January 18, 2005 The "handle" type is implemented as an integer AFIAK. Since AutoIt automatically (IIRC) handles conversions of strings, ints, dwords, and the like, you should have no problem passing a string containing an integer and AutoIt should be smart enough to figure it out. Who else would I be? Link to comment Share on other sites More sharing options...
ezzetabi Posted January 19, 2005 Author Share Posted January 19, 2005 Try this. $a = WinGetHandle('') Select Case IsString($a) MsgBox(0, '', 'String') Case IsInt($a) MsgBox(0, '', 'Int') Case IsFloat($a) MsgBox(0, '', 'Float') Case IsArray($a) MsgBox(0, '', 'Array') Case Else MsgBox(0, '', 'I am sorry this-is-me, but it is not nothing we know.') EndSelect Link to comment Share on other sites More sharing options...
this-is-me Posted January 19, 2005 Share Posted January 19, 2005 I think Jon removed the "handle=" syntax in the window titles using WinTitleMatchMode, 4 since autoit naturally supports the handle. You used to be able to set up a list of handles and use WinGetTitle("handle=" & $handle) or the like. @Jon, seeing this, does the "redundant" (Jon's description) handle= need to be reintroduced? Who else would I be? Link to comment Share on other sites More sharing options...
ezzetabi Posted January 19, 2005 Author Share Posted January 19, 2005 This is the point of the whole thread this-is-me, as you said Handle= has been removed, even if you can spot it sometime around the helpfile like in the WinGetHandle( ) entry, so I need a way to convert a string to handle or this old feature back. Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 22, 2005 Administrators Share Posted January 22, 2005 I still don't see any need for converting handles to strings, I went to a lot of trouble to make proper handles supported and the string display was added just a way of debugging. The handle= syntax is still in, just undocumented, as I need it for AutoItX Anyway, I might put some IsHandle/Conversion functions in next version but i've still not seen any overwhelming reason for it. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
SlimShady Posted July 6, 2005 Share Posted July 6, 2005 (edited) Anyway, I might put some IsHandle/Conversion functions in next version but i've still not seen any overwhelming reason for it.<{POST_SNAPBACK}>Please do I really need it.Unless you, developers, make AutoIt accept the 'handle=' syntax without the need to do Opt('WinTitleMatchMode', 4).Because else I have to turn on the 'matchmode' when starting a UDF and off at the end of the UDF. Edited July 6, 2005 by SlimShady 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