Jump to content

Please help. For variable usage in a GUI Control :(


Recommended Posts

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]
Link to comment
Share on other sites

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]
Link to comment
Share on other sites

Sorry. I think it didn't worked :)

Error says uninitialized variable.

Edited 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]
Link to comment
Share on other sites

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]
Link to comment
Share on other sites

$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]
Link to comment
Share on other sites

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]
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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]
Link to comment
Share on other sites

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]
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...