SorryButImaNewbie

GUICtrlRead doesnt work from yestarday?

22 posts in this topic

Hi guys!

I found the most disturbing thing i saw in autoit till now (in my short but glorius and countinus interaction with it :) )

Local $iarfolyam = GUICtrlRead($arfolyam)
    MsgBox(0, "This", $iarfolyam)

GUICtrlRead doesnt return value, in the msgbox it display nothing, but i wrote something (100, 10 it should receive numerics) myself. I checked the $handle and the distrubing part is, it worked when i left it last week mondays, and noone interacted with the code (they couldnt) since then 0.o . I just went through a generic check up after i returned from my "flu vacation" today, and now it doesnt work. 

I use ISN Studio, but it works everywhere else in my scripts, I just dont understand

Thank you (also ghost in the machine stories are welcome)

Share this post


Link to post
Share on other sites



SorryButImaNewbie,

The error is obviously in line 243 - I am surprised you could not see it yourself. :P

M23

P.S. Without sight of your code, how on earth do you expect anyone to offer any sensible help? :huh:


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

If Not WinExists("UD Operátor") Then
        MsgBox(0, "Üzenet", "Kérem nyissa meg az UD_OPER programot!", 10)
        Return
    EndIf
    Local $penznem = GUICtrlRead($iPenznem)
    Local $spenznem = String($penznem)
    Local $iarfolyam = GUICtrlRead($arfolyam)
    MsgBox(0, "This", $iarfolyam)
    WinActivate("UD Operátor")
    If $spenznem = "" Then
        MsgBox(0, "Hiba", "Adjon meg Pénznem kódot!")
        Return
    EndIf
    If $iarfolyam = "" Then
        MsgBox(0, "Hiba", "Adjon meg Új árfolyamot!" & $iarfolyam)
        Return
    EndIf
    ;MsgBox(0, "Árfolyam Teszt", "Az" & $penznem)
    ControlClick("UD Operátor", "Valuta", "[CLASSNN:TAdvBitBtn7]")
    WinWaitActive("Pénznem", "")
    ;ControlSetText("Pénznem", "", "[CLASSNN:TDEdit6]", $spenznem) --> why is this never works for me?
    ControlClick("Pénznem", "", "[CLASSNN:TDEdit6]")
    Send($spenznem)
    Sleep(200)
    MsgBox(0, "pip", "pup")
    ControlClick("Pénznem", "", "[CLASSNN:TAdvBitBtn6]")
    Sleep(200)
    ControlClick("Pénznem", "", "[CLASSNN:TAdvBitBtn8]")
    WinWaitActive("Árfolyam", "", 5)
    If Not WinExists("Árfolyam") Then
        MsgBox(0, "Hiba", "Hiba történt, biztos, hogy létező árfolyamot adott meg?")
        WinClose("Pénznem", "")
        Return
    EndIf
    ControlClick("Árfolyam", "", "[CLASSNN:TAdvBitBtn7]")
    WinWaitActive("Új Áfolyam", "")
    Send($iarfolyam)
    ControlClick("Új Áfolyam", "", "[CLASSNN:TBitBtn1]")
    Sleep(200)
    WinClose("Pénznem", "")
    Sleep(200)
    WinClose("Árfolyam", "")

True enough Master Melba23, sorry, and sorry wise coders of autoit :)

edit: before anyone would take it sarcasticly the wise coders part, I really mean it :) my general feelings toward this page, commuunity etc, is like a monastery of jedi masters atop of a mountain where they train and better them selfs :D I just love it, freeware for everyone!!!!

Edited by SorryButImaNewbie

Share this post


Link to post
Share on other sites

SorryButImaNewbie,

And that is supposed to help? We come across this $arfolyam control 7 lines in where you try to read its content - where is it created? What happens to it earlier in the script? :wacko:

Thanks for the compliments above, but we are not mind-readers nor do our crystal balls work every time. So please post the whole code so we can see how you interact with the control as the script runs - then we might be able to offer you some hints. As it is I stand by my "line 243" comment, because I still have nothing better to offer. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Master M23!

I read the line 243, but it was empty :) $arfolyam (exchange rate in my native language) is the handle of the textbox, created in ISN Studio, my root confiusion is that it worked before! without fails.

(also didn't know you had a crystal ball :) )

Edit: my entire script is 10k char long and most if ut has nothing to do with this function, I dont know what can you learn from it but here goes the code till the function ends:

#cs ----------------------------------------------------------------------------

    AutoIt Version: 3.3.12.0
    Author:         Balázs Gergely

    Script Function:
    UD_OPER tesztelése
#ce ----------------------------------------------------------------------------


Opt("TrayIconDebug", 1)
Opt("GUIOnEventMode", 1)

#include <MsgBoxConstants.au3>
#include <GuiStatusBar.au3>
#include <GuiEdit.au3>
#include <ScreenCapture.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <FileConstants.au3>
#include <File.au3>
#include <Date.au3>
#include <GUIConstantsEx.au3>
#include <Array.au3>
#include <UD_OPER_teszt_GUI.isf>
#include <GuiConstants.au3>

GUISetState(@SW_SHOW, $UD_OPER_teszt_GUI)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit", $UD_OPER_teszt_GUI)

Global $SAPeleres = "N:\MIG\ITI\AZO\_Kozos\EDUCS\Automata Tesztelés\UD_Oper SAP export teszt"
;Global $arfolyam
Global $bWindowFound = False
Global $sTitle = "Információ"

Alapjarat()
Func Alapjarat()

    While 1
        Sleep(50)
    WEnd

EndFunc   ;==>Alapjarat

Func _Exit()

    ;WinClose("UD Operátor") ;minek is? Szerintem egyszerűbb (kevesebb kattintás)
    Exit

EndFunc   ;==>_Exit

Func UD_OPER_belepes()

    Local $StartFileSelectFolder = FileSelectFolder("Adja meg az UD_OPER.exe mappáját!", "")
    If @error = 1 Then Return
    Run($StartFileSelectFolder & "\UD_OPERATOR_1.33") ;ÚJ VERZIÓNÁL BEAKAD!
    WinWaitActive("UD OPER")
    ;ControlSetText("TLoginForm", "", 656108, "Allah Akbar") miért nem megy? paaaaaaaaasz
    ;ControlSetText("TLoginForm", "", 1447918, "BALAZSGE")
    Send("{BS}BALAZSGE")
    Sleep(50)
    Send("{TAB}BALAZSGE")
    Sleep(50)
    Send("{ENTER}")

    #cs
        WinWaitActive("Figyelmeztetés", "", 5)
        If WinExists("Figyelmeztetés") Then
        ControlClick("Figyelmeztetés", "Ok"
        Volt valami figyelmeztetés az első belépésnél (2015.02.02) csak símán OK gombra kéne kattintani.

    #ce

EndFunc   ;==>UD_OPER_belepes

Func Arfolyam()

    If Not WinExists("UD Operátor") Then
        MsgBox(0, "Üzenet", "Kérem nyissa meg az UD_OPER programot!", 10)
        Return
    EndIf
    Local $penznem = GUICtrlRead($iPenznem)
    Local $spenznem = String($penznem)
    Local $iarfolyam = GUICtrlRead($arfolyam)
    MsgBox(0, "This", $iarfolyam)
    WinActivate("UD Operátor")
    If $spenznem = "" Then
        MsgBox(0, "Hiba", "Adjon meg Pénznem kódot!")
        Return
    EndIf
    If $iarfolyam = "" Then
        MsgBox(0, "Hiba", "Adjon meg Új árfolyamot!" & $iarfolyam)
        Return
    EndIf
    ;MsgBox(0, "Árfolyam Teszt", "Az" & $penznem)
    ControlClick("UD Operátor", "Valuta", "[CLASSNN:TAdvBitBtn7]")
    WinWaitActive("Pénznem", "")
    ;ControlSetText("Pénznem", "", "[CLASSNN:TDEdit6]", $spenznem) --> nem értem miért nem működik
    ControlClick("Pénznem", "", "[CLASSNN:TDEdit6]")
    Send($spenznem)
    Sleep(200)
    MsgBox(0, "pip", "pup")
    ControlClick("Pénznem", "", "[CLASSNN:TAdvBitBtn6]")
    Sleep(200)
    ControlClick("Pénznem", "", "[CLASSNN:TAdvBitBtn8]")
    WinWaitActive("Árfolyam", "", 5)
    If Not WinExists("Árfolyam") Then
        MsgBox(0, "Hiba", "Hiba történt, biztos, hogy létező árfolyamot adott meg?")
        WinClose("Pénznem", "")
        Return
    EndIf
    ControlClick("Árfolyam", "", "[CLASSNN:TAdvBitBtn7]")
    WinWaitActive("Új Áfolyam", "")
    Send($iarfolyam)
    ControlClick("Új Áfolyam", "", "[CLASSNN:TBitBtn1]")
    Sleep(200)
    WinClose("Pénznem", "")
    Sleep(200)
    WinClose("Árfolyam", "")
    ;ControlClick("Új Árfolyam", "",)
    ;ControlSetText("Új Áfolyam", "", "[CLASSNN:TTDCustimeEdit2]", $arfolyam)
    ;Pénznem ablak, [CLASSNN:TAdvBitBtn8]
    ;Árfolyam ablak, [CLASSNN:TAdvBitBtn7]

EndFunc   ;==>Arfolyam

also Global $arfolyam is commented out since its the handle of the textbox on the GUI, I thought when i started adding my global variables that it will be the name of $iarfolyam, which really should be $sarfolyam as its a string...

Edited by SorryButImaNewbie

Share this post


Link to post
Share on other sites

SorryButImaNewbie,

Once again that tells us absolutely nothing. There is no reference to an $arfolyam control in that snippet other then when you try to read it. :wacko:

Put yourself in our shoes. We have no idea what this script is intended to do nor how it works internally - all we can do is try and work through the code to see if we can spot an error which explains why you are not getting a return when you read a control. At the moment we have absolutely no knowledge of the control other than your statement that it is a "textbox, created in ISN Studio". We have no idea if you have created it correctly, what is likely to be in there to read, or even if it is emptied/destroyed before you read it (a not uncommon problem). Without a decent script to work on there is almost no chance that we can help you - our crystal balls (actually our experience at debugging scripts) can sometimes suggest a good line of attack, but this case is not one which offers much scope for crystallomancy. :(>

All I can suggest is that you add some debugging (such as a MsgBox/ConsoleWrite line) to your script each time the $arfolyam control is mentioned and see if you can spot a time where it does not do what you think it should. That might give you a clue as to what is happening - because there is no way that GUICtrlRead suddenly failed yesterday, it must be that there is nothing to read. Given your seemingly random use of Hungarian notation for your variables, I would also suggest checking that you have not managed to overwrite the original ControlID with another similarly named arfolyam variable. ;)

M23

1 person likes this

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Master Melba

again there is no reference, becuse it is "declered" in the .isf file created by the ISN Studio

here is the code from the .isf file 

#include-once

; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ;
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiButton.au3>

$UD_OPER_teszt_GUI = GUICreate("UD_OPER_teszt_GUI",362,464,-1,-1,-1,-1)
GUICtrlCreateButton("UD_OPER Belépés",9,419,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"UD_OPER_belepes")
GUICtrlCreateButton("Árfolyam módosítás",9,50,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"Arfolyam")
GUICtrlCreateButton("Új Valuta felvétele",9,140,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"Uj_Penznem")
GUICtrlCreateButton("Új Címlet felvétele",9,255,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"Uj_Cimlet")
GUICtrlCreateLabel("Új Árfolyam:",120,45,72,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$arfolyam = GUICtrlCreateInput("",189,40,160,20,-1,512)
GUICtrlCreateLabel("Pénznem kód:",120,68,83,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$iPenznem = GUICtrlCreateInput("",189,63,160,20,-1,512)
$penznem_kod = GUICtrlCreateInput("",199,127,150,20,-1,512)
$megnevezes = GUICtrlCreateInput("",199,150,150,20,-1,512)
$rovidites = GUICtrlCreateInput("",199,173,150,20,-1,512)
GUICtrlCreateLabel("Pénznem kód:",120,127,72,13,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel("Megnevezés:",120,150,70,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel("Rövidítés:",120,173,60,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel("Név:",120,269,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel("Címlet:",120,292,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$nev = GUICtrlCreateInput("",202,269,148,20,-1,512)
$cimlet = GUICtrlCreateInput("",202,292,148,20,-1,512)
GUICtrlCreateLabel("Pénznem kód:",120,246,70,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$penznem_kod2 = GUICtrlCreateInput("",202,246,148,20,-1,512)
GUICtrlCreateLabel("Árfolyam:",120,197,58,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$arfolyam = GUICtrlCreateInput("",199,197,151,20,-1,512)

Edit: looking for another controlID named arfolyam sounds like a good idea, I tried the MsgBox debugging but from the starts the variable seems to be empty

thanks for your patience :)

Edited by SorryButImaNewbie

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

aaaaaannnnnd yes, that was hit... thanks Master Melba :)

edit: as it can be actually seen from the .isf file

Edited by SorryButImaNewbie

Share this post


Link to post
Share on other sites

SorryButImaNewbie,

 

there is no reference, becuse it is "declered" in the .isf file created by the ISN Studio

I have no knowledge of ISN Studio (and before you ask I am not going to bother to learn how to use it) but there must be some code somewhere for the interpreter to work on. I know Koda produces a block of code which is inserted into the script to create a GUI - surely this other GUI builder does something similar? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

I would never epext you to go out of your way to learn something just to help me, I'm a bit hurt that you would think that :)

With my understanding, it works similary like Koda (which I know nothing about :) ) in the way it's create an autoit code from the monkey tricks i do in the Studio then it insert it to the running script from the .isf file (where it saves my GUI, its basicly the autoit code in a text file)

again thanks for your experience :)

Share this post


Link to post
Share on other sites

SorryButImaNewbie,

That remark was meant in jest - do not take it personally. ;)

Is there no option to export this .isf code from within ISN Studio? How does the app manage to produce a file for compilation? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

I don't really understand this term, file of compilation? is it like russiand road rage compilation? :)

.isf is the file extension it uses or file type or you know its like .exe .xml or something, while its actually basicly a text file which gets inserted to my code. I haven't yet tried to copy the .isf contents to my script

Sorry if I misunderstand you inquiry by miles :)

Share this post


Link to post
Share on other sites

SorryButImaNewbie,

Compilation is how you get an AutoIt script into a stand-alone executable file. ;)

How about posting this .isf file so I can take a look at it - it might just offer some inspiration, which I sorely need at the moment. :D

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Aaaahhh, I get it now, not sure. I compiled autoit where i had an .isf to create a stand alone executable for stress testing a webpage, and since it used the GUI I created I'm pretty sure that something like that is going on, I share the .sif file but I can't share my compiled programs :( (job regulations)

I was only able to upload the .isf with the secondary uploader, the basic didn't allowed this kind of files to be uploaded!

If these doesn't really help and you are still curious you should ask ISI360, he knows this for sure

Thanks for the help again :)

Edit: Nope I can't share it with the other neither... If you really want I can try to send it to you on mail, but I just post the entire thing here for good measure

#include-once

; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ;
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiButton.au3>

$UD_OPER_teszt_GUI = GUICreate("UD_OPER_teszt_GUI",362,464,-1,-1,-1,-1)
GUICtrlCreateButton("UD_OPER Belépés",9,419,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"UD_OPER_belepes")
GUICtrlCreateButton("Árfolyam módosítás",9,50,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"Arfolyam")
GUICtrlCreateButton("Új Valuta felvétele",9,140,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"Uj_Penznem")
GUICtrlCreateButton("Új Címlet felvétele",9,255,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"Uj_Cimlet")
GUICtrlCreateLabel("Új Árfolyam:",120,45,72,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$arfolyam = GUICtrlCreateInput("",189,40,160,20,-1,512)
GUICtrlCreateLabel("Pénznem kód:",120,68,83,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$iPenznem = GUICtrlCreateInput("",189,63,160,20,-1,512)
$penznem_kod = GUICtrlCreateInput("",199,127,150,20,-1,512)
$megnevezes = GUICtrlCreateInput("",199,150,150,20,-1,512)
$rovidites = GUICtrlCreateInput("",199,173,150,20,-1,512)
GUICtrlCreateLabel("Pénznem kód:",120,127,72,13,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel("Megnevezés:",120,150,70,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel("Rövidítés:",120,173,60,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel("Név:",120,269,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel("Címlet:",120,292,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$nev = GUICtrlCreateInput("",202,269,148,20,-1,512)
$cimlet = GUICtrlCreateInput("",202,292,148,20,-1,512)
GUICtrlCreateLabel("Pénznem kód:",120,246,70,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$penznem_kod2 = GUICtrlCreateInput("",202,246,148,20,-1,512)
GUICtrlCreateLabel("Árfolyam:",120,197,58,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$arfolyam2 = GUICtrlCreateInput("",199,197,151,20,-1,512)
GUICtrlCreateButton("Könyvelési lista",9,335,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"Konyvelesi_lista")
GUICtrlCreateButton("SAP feladás",129,335,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"SAP_szamla_feladasa")
GUICtrlCreateButton("UD információk",249,335,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"UD_informaciok")



#cs
[gui]
Handle_deklaration=
title=UD_OPER_teszt_GUI
breite=362
hoehe=464
style=-1
exstyle=-1
bgcolour=0xF0F0F0
bgimage=none
handle=UD_OPER_teszt_GUI
parent=
code=
xpos=-1
ypos=-1
center_gui=true
title_textmode=normal
[0x00011924]
handle=452
locked=0
resize=
code=
type=button
x=9
y=419
width=100
height=30
text=UD_OPER Belépés
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=UD_OPER_belepes
bgimage=
order=0
tabpage=-1
textmode=text
[0x00011928]
handle=453
locked=0
resize=
code=
type=button
x=9
y=50
width=100
height=30
text=Árfolyam módosítás
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=Arfolyam
bgimage=
order=2
tabpage=-1
textmode=text
[0x0001192C]
handle=454
locked=0
resize=
code=
type=button
x=9
y=140
width=100
height=30
text=Új Valuta felvétele
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=Uj_Penznem
bgimage=
order=3
tabpage=-1
textmode=text
[0x00011930]
handle=455
locked=0
resize=
code=
type=button
x=9
y=255
width=100
height=30
text=Új Címlet felvétele
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=Uj_Cimlet
bgimage=
order=4
tabpage=-1
textmode=text
[0x00011934]
handle=456
locked=0
resize=
code=
type=label
x=120
y=45
width=72
height=15
text=Új Árfolyam:
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=-2
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=
order=5
tabpage=-1
textmode=text
[0x00011938]
handle=457
locked=0
resize=
code=
type=input
x=189
y=40
width=160
height=20
text=
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=$WS_EX_CLIENTEDGE
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=arfolyam
func=
bgimage=
order=6
tabpage=-1
textmode=text
[0x0001193C]
handle=458
locked=0
resize=
code=
type=label
x=120
y=68
width=83
height=15
text=Pénznem kód:
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=-2
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=
order=7
tabpage=-1
textmode=text
[0x00011942]
handle=459
locked=0
resize=
code=
type=input
x=189
y=63
width=160
height=20
text=
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=$WS_EX_CLIENTEDGE
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=iPenznem
func=
bgimage=
order=8
tabpage=-1
textmode=text
[0x00011946]
handle=460
locked=0
resize=
code=
type=input
x=199
y=127
width=150
height=20
text=
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=$WS_EX_CLIENTEDGE
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=penznem_kod
func=
bgimage=
order=9
tabpage=-1
textmode=text
[0x0001194A]
handle=461
locked=0
resize=
code=
type=input
x=199
y=150
width=150
height=20
text=
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=$WS_EX_CLIENTEDGE
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=megnevezes
func=
bgimage=
tabpage=-1
textmode=text
order=10
[0x0001194E]
handle=462
locked=0
resize=
code=
type=input
x=199
y=173
width=150
height=20
text=
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=$WS_EX_CLIENTEDGE
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=rovidites
func=
bgimage=
tabpage=-1
textmode=text
order=11
[0x00011952]
handle=463
locked=0
resize=
code=
type=label
x=120
y=127
width=72
height=13
text=Pénznem kód:
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=-2
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=
order=12
tabpage=-1
textmode=text
[0x00011956]
handle=464
locked=0
resize=
code=
type=label
x=120
y=150
width=70
height=15
text=Megnevezés:
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=-2
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=
order=13
tabpage=-1
textmode=text
[0x0001195A]
handle=465
locked=0
resize=
code=
type=label
x=120
y=173
width=60
height=15
text=Rövidítés:
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=-2
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=
order=14
tabpage=-1
textmode=text
[0x0001195E]
handle=466
locked=0
resize=
code=
type=label
x=120
y=269
width=50
height=15
text=Név:
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=-2
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=
order=15
tabpage=-1
textmode=text
[0x00011962]
handle=467
locked=0
resize=
code=
type=label
x=120
y=292
width=50
height=15
text=Címlet:
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=-2
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=
order=16
tabpage=-1
textmode=text
[0x00011966]
handle=468
locked=0
resize=
code=
type=input
x=202
y=269
width=148
height=20
text=
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=$WS_EX_CLIENTEDGE
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=nev
func=
bgimage=
order=17
tabpage=-1
textmode=text
[0x0001196A]
handle=469
locked=0
resize=
code=
type=input
x=202
y=292
width=148
height=20
text=
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=$WS_EX_CLIENTEDGE
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=cimlet
func=
bgimage=
order=18
tabpage=-1
textmode=text
[0x0001196E]
handle=470
locked=0
resize=
code=
type=label
x=120
y=246
width=70
height=15
text=Pénznem kód:
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=-2
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=
order=19
tabpage=-1
textmode=text
[0x00011972]
handle=471
locked=0
resize=
code=
type=input
x=202
y=246
width=148
height=20
text=
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=$WS_EX_CLIENTEDGE
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=penznem_kod2
func=
bgimage=
tabpage=-1
textmode=text
order=20
[0x00011976]
handle=472
locked=0
resize=
code=
type=label
x=120
y=197
width=58
height=15
text=Árfolyam:
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=-2
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=
order=21
tabpage=-1
textmode=text
[0x0001197A]
handle=473
locked=0
resize=
code=
type=input
x=199
y=197
width=151
height=20
text=
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=$WS_EX_CLIENTEDGE
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=arfolyam2
func=
bgimage=
order=22
tabpage=-1
textmode=text
[0x0001197E]
handle=474
locked=0
resize=
code=
type=button
x=9
y=335
width=100
height=30
text=Könyvelési lista
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=Konyvelesi_lista
bgimage=
order=23
tabpage=-1
textmode=text
[0x00011982]
handle=475
locked=0
resize=
code=
type=button
x=129
y=335
width=100
height=30
text=SAP feladás
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=SAP_szamla_feladasa
bgimage=
order=24
tabpage=-1
textmode=text
[0x00021940]
handle=476
locked=0
resize=
code=
type=button
x=249
y=335
width=100
height=30
text=UD információk
tooltip=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
textcolour=0x000000
bgcolour=
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=UD_informaciok
bgimage=
order=25
tabpage=-1
textmode=text
#ce
Edited by SorryButImaNewbie

Share this post


Link to post
Share on other sites

SorryButImaNewbie,

That .isf file is exactly what I thought it would be. :)

You have 2 inputs there: $arfolyam & $arfolyam2 - both seem quite normal. I suggest you do as I suggested above and check carefully to make sure that you have not inadvertently overwritten the ControlIDs - it is extremely easy to do if you use similar names and do not stick to strict Hungarian notation for the names, as you can see here:

Local $iarfolyam = GUICtrlRead($arfolyam)               ; From the OP

Local $arfolyam = GUICtrlRead($arfolyam)                ; Ooops!
And just for interest, GUICtrlRead from an input will return a string, not an integer. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

#include-once

; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ;
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiButton.au3>

$UD_OPER_teszt_GUI = GUICreate("UD_OPER_teszt_GUI",362,464,-1,-1,-1,-1)
GUICtrlCreateButton("UD_OPER Belépés",9,419,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"UD_OPER_belepes")
GUICtrlCreateButton("Árfolyam módosítás",9,50,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"Arfolyam")
GUICtrlCreateButton("Új Valuta felvétele",9,140,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"Uj_Penznem")
GUICtrlCreateButton("Új Címlet felvétele",9,255,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"Uj_Cimlet")
GUICtrlCreateLabel("Új Árfolyam:",120,45,72,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$arfolyam = GUICtrlCreateInput("",189,40,160,20,-1,512)
GUICtrlCreateLabel("Pénznem kód:",120,68,83,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$iPenznem = GUICtrlCreateInput("",189,63,160,20,-1,512)
$penznem_kod = GUICtrlCreateInput("",199,127,150,20,-1,512)
$megnevezes = GUICtrlCreateInput("",199,150,150,20,-1,512)
$rovidites = GUICtrlCreateInput("",199,173,150,20,-1,512)
GUICtrlCreateLabel("Pénznem kód:",120,127,72,13,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel("Megnevezés:",120,150,70,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel("Rövidítés:",120,173,60,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel("Név:",120,269,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel("Címlet:",120,292,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$nev = GUICtrlCreateInput("",202,269,148,20,-1,512)
$cimlet = GUICtrlCreateInput("",202,292,148,20,-1,512)
GUICtrlCreateLabel("Pénznem kód:",120,246,70,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$penznem_kod2 = GUICtrlCreateInput("",202,246,148,20,-1,512)
GUICtrlCreateLabel("Árfolyam:",120,197,58,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$arfolyam = GUICtrlCreateInput("",199,197,151,20,-1,512)

 

If you look closely in your script, you have put an input ctrl in $arfolyam twice. Which, means you can only grab text from the second input.

Essentially you tried storing both input ctrls into one variable. That could be the cause of your problems. ;)

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

MikahS,

Good spot - although the file posted at post 14 has separate names for the 2 inputs as I mentioned. :thumbsup:

SorryButImaNewbie,

That reinforces my suggestion above - I now consider it very likely that you are reading the wrong control, hence the empty return. ;)

How did you end up with 2 versions of the code, anyway? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Melba,

Appreciate it, and thank you for clarifying I was hot on the case. ;)


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

I realized that in post 8 :)

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

Post your whole code now? :)

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
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