cyanidemonkey Posted December 22, 2005 Posted December 22, 2005 Is there a way I can create a dropdown with a different value to display to the one sent to other code? (like in HTML) See code below to see what I'm doing at the moment, which works, I was just wondering if there might be a quicker way to do it. GUICtrlCreateLabel ("Display Every...", 480,60,100,20) $PromoteTime = GUICtrlCreateCombo ("", 480,80,80,40) GUICtrlSetData(-1,"1 Minute|5 Minutes|10 Minutes|15 Minutes|20 Minutes|25 Minutes|30 Minutes|35 Minutes|40 Minutes|45 Minutes|50 Minutes|55 Minutes|60 Minutes", $gPromoteTime) ;Then using below to convert to milliseconds If GUICtrlRead($PromoteTime) = "1 Minute" Then $PromoteTimeTrigger = 60000 If GUICtrlRead($PromoteTime) = "5 Minutes" Then $PromoteTimeTrigger = 300000 If GUICtrlRead($PromoteTime) = "10 Minutes" Then $PromoteTimeTrigger = 600000 If GUICtrlRead($PromoteTime) = "15 Minutes" Then $PromoteTimeTrigger = 900000 If GUICtrlRead($PromoteTime) = "20 Minutes" Then $PromoteTimeTrigger = 1200000 If GUICtrlRead($PromoteTime) = "25 Minutes" Then $PromoteTimeTrigger = 1500000 If GUICtrlRead($PromoteTime) = "30 Minutes" Then $PromoteTimeTrigger = 1800000 If GUICtrlRead($PromoteTime) = "35 Minutes" Then $PromoteTimeTrigger = 2100000 If GUICtrlRead($PromoteTime) = "40 Minutes" Then $PromoteTimeTrigger = 2400000 If GUICtrlRead($PromoteTime) = "45 Minutes" Then $PromoteTimeTrigger = 2700000 If GUICtrlRead($PromoteTime) = "50 Minutes" Then $PromoteTimeTrigger = 3000000 If GUICtrlRead($PromoteTime) = "55 Minutes" Then $PromoteTimeTrigger = 3300000 If GUICtrlRead($PromoteTime) = "60 Minutes" Then $PromoteTimeTrigger = 3600000 My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator
Valuater Posted December 22, 2005 Posted December 22, 2005 (edited) like this #include <GuiConstants.au3> GUICreate("MY GUI", 600, 300) GUICtrlCreateLabel ("Display Every...", 480,60,100,20) $PromoteTime = GUICtrlCreateCombo ("", 480,80,80,40) GUICtrlSetData(-1,"1 Minute|5 Minutes|10 Minutes|15 Minutes|20 Minutes|25 Minutes|30 Minutes|35 Minutes|40 Minutes|45 Minutes|50 Minutes|55 Minutes|60 Minutes");, $gPromoteTime) GUISetState() sleep(5000); time to change the data $PromoteTimeTrigger = StringLeft((GUICtrlRead($PromoteTime)), 2) * 60000 MsgBox(0,"test", "$PromoteTimeTrigger = " & $PromoteTimeTrigger & " " ) 8) Edited December 22, 2005 by Valuater
cyanidemonkey Posted December 22, 2005 Author Posted December 22, 2005 Thanks Valuater, That works well, cheers for the help. My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now