Jump to content
Sign in to follow this  
JesusIsKing

saving data in variable

Recommended Posts

how do i save the data from a list control into a variable?

Have a look at the functions in GuiListView.au3.


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.

Share this post


Link to post
Share on other sites

Have a look at the functions in GuiListView.au3.

...or perhaps the simpler GuiListBox.au3 if it's not a ListView control.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

For $i = 1 To $Search[0]

Send($Search[$i] & "{Enter}") ; Searches for words

$index = _GUICtrlListCount($Listbox) ; trying to get index

$msg = _GUICtrlListGetText ( $Listbox, $index ) ; then trying to get the list items

; then copy the list items from the external application to my listview

;#######

; do it here

;#######

Share this post


Link to post
Share on other sites

; then copy the list items from the external application to my listview

Your trying to read it from an external application?

even more ironic, noticed and responce posted by "evilertoaster"

the particular mal-temperted toaster the name comes from have less to do with that number than you might imagine.

Although I wouldn't imagine the retial price of the toaster in question being much different than $6.66...that would be interesting... :)

Share this post


Link to post
Share on other sites

Your trying to read it from an external application?

the particular mal-temperted toaster the name comes from have less to do with that number than you might imagine.

Although I wouldn't imagine the retial price of the toaster in question being much different than $6.66...that would be interesting... :)

yes, im trying to read it from an external application.

Share this post


Link to post
Share on other sites

@FireLord oops my mistake I mean @JesusIsKing

This will not return anything even if you have the variables correct:

For $i = 1 To $Search[0]
Send($Search[$i] & "{Enter}") ; Searches for words
$index = _GUICtrlListCount($Listbox) ; trying to get index
$msg = _GUICtrlListGetText ( $Listbox, $index ) ; then trying to get the list items
; then copy the list items from the external application to my listview
;#######
; do it here
;#######
Since $index = _GUICtrlListCount($Listbox) will return the amount of items in the listbox..

$msg = _GUICtrlListGetText ( $Listbox, $index ) is working with a Zero based index

So if your count is lets say 5

Then the Index of the last item in the list is index 4.

Cheers

Share this post


Link to post
Share on other sites

what if the list is a single select list? i won't be able to use _GUICtrlSetSel? How do I copy everything from the external listview to mine? what functions can do it?

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  

×
×
  • Create New...