Jump to content

Odd combobox problem


 Share

Recommended Posts

I am assuming that it works for you over a network.

I am not at work so I cannot do anything until monday. Any suggestions one what I should try to solve this mystery. I will be surprised if it would work but I thought of adding a "|" at the end of $customerlistlocation.

Since this needs to get done I might add a "\Local" switch and by pass the registery on the local machine.

A couple of suggestions:

1) Are you certain that there is nothing flaky about my code?

2) Do you see anything flaky by the text file that you can see? (I don't. I noticed the odd square in the console output but that happens both locally and over the network.)

Edited by GWmellon
Link to comment
Share on other sites

Just to make the example as clean as possible, the customer.txt file is the the root of the computer which is currently (and briefly) shared. Using msg box for the value of $customerlistlocation, the computer that works over the network returns \\key\rootc\customer.txt. The computer where it does not work locally returns C:\customer.txt.

By the way, the file is being read. All the vessels are showing up in the ConsoleWrite and Debug statements.

One more btw. This code is being used in three different programs, two of which have to be accessed both on the local computer and over the network.

Quick question, and it may be a stupid one, but what if you change the height of your combobox ?
$Vessel = GUICtrlCreateCombo("", 136, 8, 241, 150)

I've run into this problem on Windows 2000 and some XP machines with modified themes where a combobox height of 25 displays nothing when you click on the dropdown.

Link to comment
Share on other sites

Since it works correctly over the network and locally when the reg called is not included I doubt that is the cause. However, I try it on Monday. If it fixes the problem I think you and I should get a cash award. Me for finding the world's most obscure autoit bug and you for finding the strange solution. :P

Link to comment
Share on other sites

Been playing with this for the last hour or so and discovered something curious. Adding this

$customerlistlocation = "c:\customers.txt"

Works on some machines but not on others. OSs are either xp or 2000. The same file is used on all machines. All machines will also access the file over the network. On all machines where the combo box isn't populated you see the vessel names if you put a msgbox either before or after GUICtrlSetData.

The "|" test didn't work by the way.

One other item. If I change "$Vesselnameused1 = StringReplace($Vesselname[$X], @TAB, " ")" to "$Vesselnameused1 = $Vesselname[$X]" it still does not work correctly but it does put the last item in the combo box

Edited by GWmellon
Link to comment
Share on other sites

  • Developers

Have you tried changing the Height of the Combobox as suggested ? (Some OSes have an issue with Comboboxes and it looks like there is nothing there when clicking the arrow at the right hand site)

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

My apologies to ResNullius. I had not tried it but just did. It worked. Any idea why it worked when I used the

$customerlistlocation = "customers.txt"

you suggested?

Thanks to all who helped.

I didn't say I suggested it ..i think ;)

The behaviour of the Combobox isn't depending on the inputfile but it must have something to do with the loaded data. One of the things I noticed while testing was that you also added spaces at the end of each entry and an empty entry at the end.

Anyways, glad the mystery is solved :P

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

My apologies to ResNullius. I had not tried it but just did. It worked.

I have to believe that your testing procedure was faulty :P

If you sat at one machine, ran the script accessing the file over the network and it worked, and then on the exact same machine tried accessing the file locally and it didn't work, there is indeed a further mystery. I tried $customerlistlocation = "customers.txt" on my Windows 2000 box and the combo still didn't drop down until I adjusted the height.

If it fixes the problem I think you and I should get a cash award. Me for finding the world's most obscure autoit bug and you for finding the strange solution. ;)

Cash donations towards the hosting of the AutoIt forum gratefully accepted here: Donate! :)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...