Jump to content
Cyborg5000

Cannot use _GUICtrlEdit_SetText for 3-4 inputs..

Recommended Posts

Cyborg5000

Cannot use _GUICtrlEdit_SetText for 3-4 inputs..

Share this post


Link to post
Share on other sites
MikahS

Post your code, how would we even be able to help you with this without any idea of what you're doing? :blink:


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
Cyborg5000

#Region ### START Koda GUI section ### Form=c:\users\slingaya\desktop\system.kxf
$System = GUICreate("BIOS", 652, 222, 194, 129, BitOR($GUI_SS_DEFAULT_GUI,$WS_MINIMIZE))
$Sysname = GUICtrlCreateLabel("System Name", 16, 8, 100, 20, -1, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Sysbiosver = GUICtrlCreateLabel("System BIOS Version", 16, 104, 151, 20, -1, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$biosreldt = GUICtrlCreateLabel("BIOS Release Date", 16, 72, 139, 20, -1, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$model = GUICtrlCreateLabel("System Model", 16, 40, 102, 20, -1, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$dellavlbi = GUICtrlCreateLabel("Available Dell Bios Version", 16, 136, 194, 20, -1, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Checkbox1 = GUICtrlCreateCheckbox("Download", 488, 136, 105, 33, $BS_CHECKBOX)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Download and FLASH", 488, 168, 145, 41, $BS_DEFPUSHBUTTON)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Progress1 = GUICtrlCreateProgress(272, 176, 172, 25, BitOR($PBS_SMOOTH,$WS_BORDER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
$Button2 = GUICtrlCreateButton("Check BIOS Status", 488, 8, 145, 33, $BS_DEFPUSHBUTTON)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$sysmodel = GUICtrlCreateInput("", 272, 40, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
$Biorlsdt = GUICtrlCreateInput("", 272, 72, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
$sysbiover = GUICtrlCreateInput("", 272, 104, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
$Avdlbiovr = GUICtrlCreateInput("", 272, 136, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
$sysnamd = GUICtrlCreateInput("", 272, 8, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


$compname = @ComputerName
$sysmod = RegRead ("HKLM64\HARDWARE\DESCRIPTION\System\BIOS", "SystemProductName")
$biorldt = RegRead ("HKLM64\HARDWARE\DESCRIPTION\System\BIOS", "BIOSReleaseDate")

 

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $System
        Case $System
        Case $System
        Case $System
        Case $Sysname
        Case $Sysbiosver
        Case $biosreldt
        Case $model
        Case $dellavlbi
        Case $Checkbox1
        Case $Button1
        Case $Button2
        Case $System  = $sysmodel
            _GUICtrlEdit_SetText ($sysmodel, $sysmod)
        Case $Biorlsdt
        Case $sysbiover
        Case $Avdlbiovr
        Case $sysnamd = $System
_GUICtrlEdit_SetText ($sysnamd, $compname)

Share this post


Link to post
Share on other sites
MikahS

If you may, please edit to put your code in the code box using the <> on the toolbar next to the smiley. 

Also, that is not even working code. :ermm:

You have 4 case statements for $system as well, why is that?


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
Cyborg5000

If you may, please edit to put your code in the code box using the <> on the toolbar next to the smiley. 

Also, that is not even working code. :ermm:

You have 4 case statements for $system as well, why is that?

Was trying different things to make it work. However if i dont put the form + the data where i need to auto put, i cant get _GUICtrlEdit_SetText to work...

Case $System  = $sysmodel
            _GUICtrlEdit_SetText ($sysmodel, $sysmod)
        Case $Biorlsdt
        Case $sysbiover
        Case $Avdlbiovr
        Case $sysnamd = $System
_GUICtrlEdit_SetText ($sysnamd, $compname)

 

these 5 things are not working or setting data when using _GUICtrlEdit_SetText

Share this post


Link to post
Share on other sites
MikahS

A while loop is an event loop. Meaning that it is looking for events on the GUI. If you're trying to autofill these values before there has been an event on the GUI, then you need to fill them before going into the loop, like so:

#include <GUIConstants.au3>
#include <GUIEdit.au3>

#Region ### START Koda GUI section ### Form=c:\users\slingaya\desktop\system.kxf
Local $System = GUICreate("BIOS", 652, 222, 194, 129, BitOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZE))
Local $Sysname = GUICtrlCreateLabel("System Name", 16, 8, 100, 20, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
Local $Sysbiosver = GUICtrlCreateLabel("System BIOS Version", 16, 104, 151, 20, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
Local $biosreldt = GUICtrlCreateLabel("BIOS Release Date", 16, 72, 139, 20, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
Local $model = GUICtrlCreateLabel("System Model", 16, 40, 102, 20, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
Local $dellavlbi = GUICtrlCreateLabel("Available Dell Bios Version", 16, 136, 194, 20, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
Local $Checkbox1 = GUICtrlCreateCheckbox("Download", 488, 136, 105, 33, $BS_CHECKBOX)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
Local $Button1 = GUICtrlCreateButton("Download and FLASH", 488, 168, 145, 41, $BS_DEFPUSHBUTTON)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
Local $Progress1 = GUICtrlCreateProgress(272, 176, 172, 25, BitOR($PBS_SMOOTH, $WS_BORDER), BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
Local $Button2 = GUICtrlCreateButton("Check BIOS Status", 488, 8, 145, 33, $BS_DEFPUSHBUTTON)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
Local $sysmodel = GUICtrlCreateInput("", 272, 40, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER), BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
Local $Biorlsdt = GUICtrlCreateInput("", 272, 72, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER), BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
Local $sysbiover = GUICtrlCreateInput("", 272, 104, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER), BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
Local $Avdlbiovr = GUICtrlCreateInput("", 272, 136, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER), BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
Local $sysnamd = GUICtrlCreateInput("", 272, 8, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER), BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


Local $compname = @ComputerName
Local $sysmod = RegRead("HKLM64\HARDWARE\DESCRIPTION\System\BIOS", "SystemProductName")
Local $biorldt = RegRead("HKLM64\HARDWARE\DESCRIPTION\System\BIOS", "BIOSReleaseDate")

_GUICtrlEdit_SetText($sysmodel, $sysmod)
_GUICtrlEdit_SetText($sysnamd, $compname)
_GUICtrlEdit_SetText($Biorlsdt, $biorldt)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Sysname
        Case $Sysbiosver
        Case $biosreldt
        Case $model
        Case $dellavlbi
        Case $Checkbox1
        Case $Button1
        Case $Button2
        Case $sysmodel
            _GUICtrlEdit_SetText($sysmodel, $sysmod)
        Case $Biorlsdt
        Case $sysbiover
        Case $Avdlbiovr
        Case $sysnamd
            _GUICtrlEdit_SetText($sysnamd, $compname)
    EndSwitch
WEnd

 

  • Like 1

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

×