Mcky Posted June 11, 2007 Posted June 11, 2007 I assign $num=1 $input1=GuiCtrlCreateInput... However, when i set Msgbox(0,"test",GuiCtrlRead($input&$num)) script error. help ? My website: (Lots of AutoIt compiled programs+GameMaker games)http://mcky.sitesled.comMy AutoIt projects:Mcky's CalEntry - Calendar schedulingMcky's Web Extractor - Web page links extractorMcky's Appkey- Powerful Hotkey-listing tool[quote]I wish I was never born. I am just a lonely soul in this world... :([/quote]
poisonkiller Posted June 11, 2007 Posted June 11, 2007 (edited) You are trying to GUICtrlRead $num and that's what generates error. This should work: MsgBox(0, "test", GUICtrlRead($input1) & $num) Edited June 11, 2007 by poisonkiller
Mcky Posted June 11, 2007 Author Posted June 11, 2007 WOW!!!!!!!!!!!! That was fast!! Thanks! My website: (Lots of AutoIt compiled programs+GameMaker games)http://mcky.sitesled.comMy AutoIt projects:Mcky's CalEntry - Calendar schedulingMcky's Web Extractor - Web page links extractorMcky's Appkey- Powerful Hotkey-listing tool[quote]I wish I was never born. I am just a lonely soul in this world... :([/quote]
Mcky Posted June 11, 2007 Author Posted June 11, 2007 (edited) Sorry. I think it didn't worked Error says uninitialized variable. Edited June 11, 2007 by Mcky My website: (Lots of AutoIt compiled programs+GameMaker games)http://mcky.sitesled.comMy AutoIt projects:Mcky's CalEntry - Calendar schedulingMcky's Web Extractor - Web page links extractorMcky's Appkey- Powerful Hotkey-listing tool[quote]I wish I was never born. I am just a lonely soul in this world... :([/quote]
Mcky Posted June 11, 2007 Author Posted June 11, 2007 Please help. Tis is a bit difficult for me. My website: (Lots of AutoIt compiled programs+GameMaker games)http://mcky.sitesled.comMy AutoIt projects:Mcky's CalEntry - Calendar schedulingMcky's Web Extractor - Web page links extractorMcky's Appkey- Powerful Hotkey-listing tool[quote]I wish I was never born. I am just a lonely soul in this world... :([/quote]
poisonkiller Posted June 11, 2007 Posted June 11, 2007 (edited) Could you post your whole script please? EDIT: MHz, you are fast, I was just about to fix it. Edited June 11, 2007 by poisonkiller
Mcky Posted June 11, 2007 Author Posted June 11, 2007 $num=1 $input_hot1 = GUICtrlCreateInput("", 53, 245, 97, 24, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY)) MsgBox(0,"a",GUICTRLREAD($input_hot&$num)) Still won't work. My website: (Lots of AutoIt compiled programs+GameMaker games)http://mcky.sitesled.comMy AutoIt projects:Mcky's CalEntry - Calendar schedulingMcky's Web Extractor - Web page links extractorMcky's Appkey- Powerful Hotkey-listing tool[quote]I wish I was never born. I am just a lonely soul in this world... :([/quote]
poisonkiller Posted June 11, 2007 Posted June 11, 2007 $num must be outside of GUICtrlRead(). And $input_hot is missing "1". $num=1 $input_hot1 = GUICtrlCreateInput("", 53, 245, 97, 24, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY)) MsgBox(0,"a",GUICTRLREAD($input_hot1) & $num)
Mcky Posted June 11, 2007 Author Posted June 11, 2007 Unfortunately it still doesn't work. Basically i got 60 input boxes and have been trying to read the data from them using the code stated above. $num is 1 to 60. My website: (Lots of AutoIt compiled programs+GameMaker games)http://mcky.sitesled.comMy AutoIt projects:Mcky's CalEntry - Calendar schedulingMcky's Web Extractor - Web page links extractorMcky's Appkey- Powerful Hotkey-listing tool[quote]I wish I was never born. I am just a lonely soul in this world... :([/quote]
MHz Posted June 11, 2007 Posted June 11, 2007 Arrh, I understand what you are doing now. Use Eval() $num=1 $input_hot1 = GUICtrlCreateInput("", 53, 245, 97, 24, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY)) MsgBox(0,"a",GUICTRLREAD(Eval($input_hot&$num)))
poisonkiller Posted June 11, 2007 Posted June 11, 2007 (edited) Then you should modify your code to something like this: #include <GUIConstants.au3> Dim $input_hot[61], $data = "" GUICreate("60 inputs", ....) $input_hot[1] = GUICtrlCreateInput("", ...) $input_hot[2] = GUICtrlCreateInput("", ...) ...... For $i = 1 to 60 $data &= GUICtrlRead($input_hot[$i]) & @CRLF Next MsgBox(0, "test", $data) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit WEnd EDIT: MHz-s code works too, so it's your choice which one to use. Edited June 11, 2007 by poisonkiller
Mcky Posted June 11, 2007 Author Posted June 11, 2007 Thanks both of you. Sorry for troubling. Now trying, hopefully it works My website: (Lots of AutoIt compiled programs+GameMaker games)http://mcky.sitesled.comMy AutoIt projects:Mcky's CalEntry - Calendar schedulingMcky's Web Extractor - Web page links extractorMcky's Appkey- Powerful Hotkey-listing tool[quote]I wish I was never born. I am just a lonely soul in this world... :([/quote]
Mcky Posted June 11, 2007 Author Posted June 11, 2007 posionkiller. I salute you! It finally works. My website: (Lots of AutoIt compiled programs+GameMaker games)http://mcky.sitesled.comMy AutoIt projects:Mcky's CalEntry - Calendar schedulingMcky's Web Extractor - Web page links extractorMcky's Appkey- Powerful Hotkey-listing tool[quote]I wish I was never born. I am just a lonely soul in this world... :([/quote]
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