Jump to content
Sign in to follow this  
FireLord

INI + WinActive + Send Problem

Recommended Posts

FireLord

Hi,

I'm pretty frustrated right now because of the difficulties I've been having with my script, so now I'm going completely back to the beginning.

I need my program to read from an INI that has one key with a bunch of values in the key each separated by a comma like this:

[section]

Key=value1,value2,value3

Then, I want my program to input one-by-one the values in the INI file (what I am having trouble with) into another window that has an input in it. So for example, after it inputs the first value in the ini into the input in the other window it will press enter. Then in the other window (the same one my program just inputted the first value into, it has a listview which contains data about the string just inputted by my program. I then need my program to copy all of the data in the listview in the window into my listview ($nListview for example). Then repeat the process until all values were inputted...

I'm having trouble doing this and have had no luck so far. Hoping someone could point me in the right direction.

Thanks.

FireLord

Edited by FireLord

[center]See the Helpfile[/center]
While Alive()
	 DrinkWine();
}
[center][/center]

Share this post


Link to post
Share on other sites
GEOSoft

Hi,

I'm pretty frustrated right now because of the difficulties I've been having with my script, so now I'm going completely back to the beginning.

I need my program to read from an INI that has one key with a bunch of values in the key each separated by a comma like this:

[section]

Key=value1,value2,value3

Then, I want my program to input one-by-one the values in the INI file (what I am having trouble with) into another window that has an input in it. So for example, after it inputs the first value in the ini into the input in the other window it will press enter. Then in the other window (the same one my program just inputted the first value into, it has a listview which contains data about the string just inputted by my program. I then need my program to copy all of the data in the listview in the window into my listview ($nListview for example).

I'm having trouble doing this and have had no luck so far. Hoping someone could point me in the right direction.

Thanks.

FireLord

Is it supposed to do anything besides in a roundabout way populate a listview control?

You could StringSplit the Ini value using the comma as the separator to create an array and then loop through the array.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
FireLord

Is it supposed to do anything besides in a roundabout way populate a listview control?

You could StringSplit the Ini value using the comma as the separator to create an array and then loop through the array.

I did that already. :P

$buddiesSearch = StringSplit($var, ",")
For $i = 1 To $buddiesSearch[0]

I'm not really having a problem doing that, its copying the data from that other listview into my programs listview. It's probably so simple yet I've been having this problem for a week.

BTW: Tried _GUICtrlListViewCopyItems() didn't work.


[center]See the Helpfile[/center]
While Alive()
	 DrinkWine();
}
[center][/center]

Share this post


Link to post
Share on other sites
GEOSoft

I did that already. :P

$buddiesSearch = StringSplit($var, ",")
For $i = 1 To $buddiesSearch[0]

I'm not really having a problem doing that, its copying the data from that other listview into my programs listview. It's probably so simple yet I've been having this problem for a week.

BTW: Tried _GUICtrlListViewCopyItems() didn't work.

Maybe if you can post the code that you have tried we can see where it needs to be fixed. Right now I must be brain dead because I don't really understand the problem as you outlined it.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
FireLord

Maybe if you can post the code that you have tried we can see where it needs to be fixed. Right now I must be brain dead because I don't really understand the problem as you outlined it.

I don't really understand the problem as you outlined it.

I want my program to be able to input values from INI ONE-BY-ONE into another window and then

when the window returns results in its listview I want everything in its listview copied into mine.

Code:

$buddiesSearch = StringSplit($var, ","); $var is my INI file
                Send("{CTRLDOWN}{f}")
                Send("{CTRLUP}")                
                        For $i = 1 To $buddiesSearch[0]
                            Send($buddiesSearch[$i] & Send("{Enter}"))
                    $xListview = ControlGetHandle("Find Player", "", "[CLASS:Listbox; INSTANCE:1]" ); Try to get the handle for the other window's listview control
                    _GUICtrlListViewCopyItems($xListview, $nListview); $nListview is my listview
                        Next
Edited by FireLord

[center]See the Helpfile[/center]
While Alive()
	 DrinkWine();
}
[center][/center]

Share this post


Link to post
Share on other sites
FireLord

So? Anyone have any suggestions on how to accomplish this?


[center]See the Helpfile[/center]
While Alive()
	 DrinkWine();
}
[center][/center]

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  

×