Jump to content

JoseS

Members
  • Posts

    4
  • Joined

  • Last visited

About JoseS

  • Birthday 11/24/1970

Profile Information

  • Location
    Southern CA

JoseS's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I had the same problem once, and I remember I solved by using a different variable for the GuiGetMsg() function. Notice that in the main part of the program, you call it $nMsg. Then, in the About part, you use $nMsg again to query the status of the About GUI. Also, in the second While/Wend loop, I added the following to my script: While 1 $mMsg = GUIGetMsg() Switch $mMsg Case $GUI_EVENT_CLOSE GUIDelete($About) ExitLoop EndSwitch WEnd See if that helps... Jose
  2. Scriptjunkie, Why not avoid the hassle and use an open source alternative? Search for "Console telnet for win32" in your favorite search engine, and you can include their small binary (less than 350K including INI, KEYS and ICO files) along with your program. Console Telnet If you still want to use the built-in telnet client, have you tried to run the program using the ShellExecute function? Hope that helps! Jose
  3. The way I would do it (and some of the experts can correct me if I'm wrong...) would be to use StringCompare: $local_version = "10.20.0.0" ;~ $remote = "9.0.0.0" $remote_version = "10.20.0.1" $test = StringCompare($local_version,$remote_version) If $test = 0 Then ConsoleWrite("Strings are the same..." & @CRLF) ElseIf $test > 0 Then ConsoleWrite("Local is greater than remote" & @CRLF) Else ConsoleWrite("Remote is greater than local" & @CRLF) EndIf J
  4. Hello everyone, I've been a lurker for a while, and have learned many things in these forums, which I've successfully applied. Now I was wondering if some of the most experienced users could assist me with a problem that I seem I can't find an answer to, even after searching. I have a GUI that reads values from the registry, and populates the GUI. The window looks (kinda) like this: Program Name | Program Version Program A | 1.1.00.25 Program B | 2.1.00.50 Program C | 1.1.00.25 Program D | 5.25.10.25 Program E | 3.1.00.51 Under each column, program name and version are populated by the values found in the registry. Now, I need to check that the correct program is installed against another set of data. This comes in the form of an INI file, containing information like the sample shown below. [data] key0=5 key1=Program BA~1.1.00.25 key2=Program B~2.1.00.50 key3=Program C~1.1.00.25 key4=Program D~5.25.10.25 key5=ProgramE~2.1.00.51 I used "~" as the delimiter between the program name and the version number. Also, key0 holds the number of entries found in the program. This is so that when I read the value under key0, I will now how many programs were found in the master database. Note that the program names may not match the ones found in the registry, but the version should match, no matter the name. I want to change my original program to read this INI file to populate a combo box which I want to place after the "Program Version" entry. So, the new GUI would look like this: Program Name | Program Version | INI Program Name Program A | 1.1.00.25 | Program BA/Program C Program B | 2.1.00.50 | Program B Program C | 1.1.00.25 | Program BA/Program C Program D | 5.25.10.25 | Program D Program E | 3.1.00.51 | No Program Found The lines with "Program BA/Program C" would use a combo box to give the user the choice of selecting one or the other. But how can I add that combo box in the same listview window? Is that even possible? Also, can I only use a combo box when two items or more have a similar version number? Oh yeah, you may have noticed that while the program names may be different, it is the version number that doesn't change. Unfortunately, there's the chance that two programs could have the same version number, which led me to think that a combo box might be the solution I need. Of course, this is not set in stone, and if anyone has any pointers/tips on how to better implement what I want to do, I'm definitely open to suggestions. I hope this helps explain what I'm trying to do. If you need more information, please do not hesitate to ask and I will provide whatever information I can. Sorry for the ASCII art... :-) And your time and help is greatly appreciated. Jose
×
×
  • Create New...