Jump to content

Recommended Posts

Posted

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]
Posted (edited)

You are trying to GUICtrlRead $num and that's what generates error. This should work:

MsgBox(0, "test", GUICtrlRead($input1) & $num)
Edited by poisonkiller
Posted

$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]
Posted

$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)
Posted

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]
Posted (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 by poisonkiller

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
  • Recently Browsing   0 members

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