Sign in to follow this  
Followers 0
au3scr

my script dont work

6 posts in this topic

$secbinar = 00
     GUICtrlSetData ($secbinar,"0011000000110000")
    MsgBox (48,"lol",$secbinar)

This scrpt must change value, but it dont do it, whats the problem?

Can anyone say it?


Share this post


Link to post
Share on other sites



$secbinar = 00
     GUICtrlSetData ($secbinar,"0011000000110000")
    MsgBox (48,"lol",$secbinar)

This scrpt must change value, but it dont do it, whats the problem?

Can anyone say it?

Does anyone ever tell you that you're frustrating?

1. You are declaring $secbinar as just a variable, not a GUI object.

2. You are trying to use GUICtrlSetData on a non-GUI object

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

@au3scr....Guictrlsetdata() is used to set data to a control in your GUI. I am not sure why you have $secbinar=00...This is the line that is preventing you setting the new data to your control. Please provide the entire script for better assistance.

....Nevermind Weaponx got it...

Edited by DjDeep00

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

@weaponx ... No one said me that i am frustrating,why should someone say it?

how i dot it then?

Edited by au3scr

Share this post


Link to post
Share on other sites

@weaponx ... No one said me that i am frustrating,why should someone say it?

how i dot it then?

Are you even using a GUI? Or are you jsut trying to set a variable?

$secbinar = 00

$secbinar = 0011000000110000

MsgBox (48,"lol",$secbinar)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Are you even using a GUI? Or are you jsut trying to set a variable?

$secbinar = 00

$secbinar = 0011000000110000

MsgBox (48,"lol",$secbinar)

its gui

I want make IF sentence

IF time is xx:xx:00 Then it returns on label is xx:xx:0011000000110000

My work is here:

#include <GUICONSTANTS.au3>
#include <String.au3>

global $hour = @HOUR
global $min = @MIN
global $sec = @SEC

$t = GUICreate("Clock", 250, 70)
$aeg = GUICtrlCreateLabel("Time: " & @HOUR & ":" & @MIN & ":" & @SEC, 10, 10)
$aeghex = GUICtrlCreateLabel("Time: " & $hour & ":" & $MIN & ":" & $SEC, 10, 30,200,12)
$aegbin = GUICtrlCreateLabel("Time: " & $hour & ":" & $MIN & ":" & $SEC, 10, 50,200,12)
GUISetState(@SW_SHOW)
AdlibEnable("Do_Function", 1000)
While 1
    $tMsg = GUIGetMsg()
    Switch $tMsg
        Case $GUI_EVENT_CLOSE
            GUIDelete($t)
            ExitLoop
    EndSwitch
WEnd

Func Do_Function()
    GUICtrlSetData($aeg, "Time: " & @HOUR & ":" & @MIN & ":" & @SEC)
    $hourh = @hour
    $minh = @min
    $sech = @SEC
    $hourhh = _StringToHex ($hourh)
    $minhh = _StringToHex ($minh)
    $sechh = _StringToHex ($sech)
    GUICtrlSetData($aeghex, "Time: " & $hourhh & ":" & $minhh& ":" & $sechh)
    GUICtrlSetData ($hour,@hour)
    GUICtrlSetData ($min,@min)
    GUICtrlSetData ($sec,@SEC)
    $hourbinar = @hour
    $secbinar = 00
    $minbinar = @min
     GUICtrlSetData ($secbinar,"0011000000110000")
#   MsgBox (48,"lol",$secbinar)
    If $secbinar = 00 Then
     GUICtrlSetData ($secbinar,0011000000110000)
     GUICtrlSetData($aegbin, "Time: " & $hourbinar & ":" & $minbinar& ":" & $secbinar)
    EndIf   
    
EndFunc   ;==>Do_Function
Edited by au3scr

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
Sign in to follow this  
Followers 0