Quote from Bagon on August 17, 2023, 11:08 pmI can't figure out how to create a combobox.
I have several bat files with commands.
I need each command to work out its bat and stop.
but they are all executed sequentially when you click on any selected item! what am I doing wrong?alRun "[PubDir]kill.bat" "True" "" "" "" "True" alRun "[PubDir]AT.bat" "True" "" "" "" "True" alRun "[PubDir]BE.bat" "True" "" "" "" "True" alRun "[PubDir]BG.bat" "True" "" "" "" "True"kill AT BE BGtasklist | find /i "pm.exe" && taskkill /f /t /im "pm.exe" TIMEOUT /T 3 @cd /d "%~dp0" start "" pm.exe --cfg AT.cfg --list.dat TIMEOUT /T 3
I can't figure out how to create a combobox.
I have several bat files with commands.
I need each command to work out its bat and stop.
but they are all executed sequentially when you click on any selected item! what am I doing wrong?
alRun "[PubDir]kill.bat" "True" "" "" "" "True" alRun "[PubDir]AT.bat" "True" "" "" "" "True" alRun "[PubDir]BE.bat" "True" "" "" "" "True" alRun "[PubDir]BG.bat" "True" "" "" "" "True"
kill AT BE BG
tasklist | find /i "pm.exe" && taskkill /f /t /im "pm.exe" TIMEOUT /T 3 @cd /d "%~dp0" start "" pm.exe --cfg AT.cfg --list.dat TIMEOUT /T 3
Uploaded files:
Quote from Gaev on August 18, 2023, 1:21 am@bagon
I need each command to work out its bat and stop.
but they are all executed sequentially when you click on any selected item! what am I doing wrong?This is because, in the "Selection Changed" event section, you have setup commands to run all four bat files ... you need to check what the selection was, and then invoke the corresponding bat file.
On this Help page ... https://winhelp.visualneo.com/ListBoxComboBoxTools.html ... it says ...
In order to keep track of the which item in the list is selected while your publication is running, you can assign the List/Combo Box a unique variable name. VisualNEO Win will automatically assign a variable name that matches the Object Name, but you may change this by modifying the Variable (to store selected item) field.
From your screenshot, you will notice that it is [ComboBox1] in your case ... so your event code should be ...
If "[ComboBox1]" "=" "kill" alRun "[PubDir]kill.bat" "True" "" "" "" "True" Return Endif If "[ComboBox1]" "=" "AT" alRun "[PubDir]AT.bat" "True" "" "" "" "True" Return Endif If "[ComboBox1]" "=" "BE" alRun "[PubDir]BE.bat" "True" "" "" "" "True" Return Endif If "[ComboBox1]" "=" "BG" alRun "[PubDir]BG.bat" "True" "" "" "" "True" Return Endif
I need each command to work out its bat and stop.
but they are all executed sequentially when you click on any selected item! what am I doing wrong?
This is because, in the "Selection Changed" event section, you have setup commands to run all four bat files ... you need to check what the selection was, and then invoke the corresponding bat file.
On this Help page ... https://winhelp.visualneo.com/ListBoxComboBoxTools.html ... it says ...
In order to keep track of the which item in the list is selected while your publication is running, you can assign the List/Combo Box a unique variable name. VisualNEO Win will automatically assign a variable name that matches the Object Name, but you may change this by modifying the Variable (to store selected item) field.
From your screenshot, you will notice that it is [ComboBox1] in your case ... so your event code should be ...
If "[ComboBox1]" "=" "kill" alRun "[PubDir]kill.bat" "True" "" "" "" "True" Return Endif If "[ComboBox1]" "=" "AT" alRun "[PubDir]AT.bat" "True" "" "" "" "True" Return Endif If "[ComboBox1]" "=" "BE" alRun "[PubDir]BE.bat" "True" "" "" "" "True" Return Endif If "[ComboBox1]" "=" "BG" alRun "[PubDir]BG.bat" "True" "" "" "" "True" Return Endif