Sign in to follow this  
Followers 0
Sublime

Unknown Problem

5 posts in this topic

#1 ·  Posted (edited)

:D I am using the latest beta and out of no where I started getting an error saying "$status1 = GUICtrlRead($APP1_CHKBOX)

$status1 = GUICtrlRead(^ ERROR"

I can not figure out why this has starrted happening :D

CODE
While 1

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

Exit

Case $msg = $EXIT

Exit

Case $msg = $RUN

Call("CheckandRun")

EndSelect

WEnd

EndFunc ;==>Main

Func CheckandRun()

; First Column Status Boxes

$status1 = GUICtrlRead($APP1_CHKBOX)

$status2 = GUICtrlRead($APP2_CHKBOX)

$status3 = GUICtrlRead($APP3_CHKBOX)

$status4 = GUICtrlRead($APP4_CHKBOX)

$status5 = GUICtrlRead($APP5_CHKBOX)

$status6 = GUICtrlRead($APP6_CHKBOX)

$status7 = GUICtrlRead($APP7_CHKBOX)

$status8 = GUICtrlRead($APP8_CHKBOX)

$status9 = GUICtrlRead($APP9_CHKBOX)

$status10 = GUICtrlRead($APP10_CHKBOX)

; Second Column Status Boxes

$status11 = GUICtrlRead($APP10_CHKBOX)

$status12 = GUICtrlRead($APP10_CHKBOX)

$status13 = GUICtrlRead($APP10_CHKBOX)

$status14 = GUICtrlRead($APP10_CHKBOX)

$status15 = GUICtrlRead($APP10_CHKBOX)

$status16 = GUICtrlRead($APP10_CHKBOX)

$status17 = GUICtrlRead($APP10_CHKBOX)

;$status18 = GUICtrlRead($APP10_CHKBOX)

;$status19 = GUICtrlRead($APP10_CHKBOX)

;$status20 = GUICtrlRead($APP10_CHKBOX)

; Start Status Of First Column

If $status1 = 1 Then Call("APP_1")

If $status2 = 1 Then Call("APP_2")

If $status3 = 1 Then Call("APP_3")

If $status4 = 1 Then Call("APP_4")

If $status5 = 1 Then Call("APP_5")

If $status6 = 1 Then Call("APP_6")

If $status7 = 1 Then Call("APP_7")

If $status8 = 1 Then Call("APP_8")

If $status9 = 1 Then Call("APP_9")

If $status10 = 1 Then Call("APP_10")

; Start Status Of Second Column

If $status11 = 1 Then Call("APP_11")

If $status12 = 1 Then Call("APP_12")

If $status13 = 1 Then Call("APP_13")

If $status14 = 1 Then Call("APP_14")

If $status15 = 1 Then Call("APP_15")

If $status16 = 1 Then Call("APP_16")

If $status17 = 1 Then Call("APP_17")

;IF $status18 = 1 then call ("APP_10")

;IF $status19 = 1 then call ("APP_10")

;IF $status20 = 1 then call ("APP_10")

EndFunc ;==>CheckandRun

EDIT:

Also I have dimed all the status and checkbox variables

Edited by Sublime

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

That is all the script aside from the gui which just has a bunch of checkboxes and buttons than from there links off to 18 other scripts.

Anywho, I think I got it fugred out. Its funny how things work out after you have asked for help :D spent 3 hrs thinking and re re re rereading my code than I post than it hit me like a brick wall what the problem was.

While your looking at this can you tell me how I would use this to loop a 16sec music clip for the use of background music and yes I am using the sound udf

Do
    $info = _SoundGetInfo ()
    If $info[1] <> "playing" Then SoundPlay("sound\bgmusic.mp3")

I can not figure out how to right the Untill expression it errors everytime.

Edited by Sublime

Share this post


Link to post
Share on other sites

why not just use the Adlib functionality?

AdlibEnable("_SoundPlay", 16000) ;;Every 16 seconds
Func _SoundPlay()
   SoundPlay("sound\bgmusic.mp3")
EndFunc

#)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I had thought of that but that doesnt take into account that a machine may lag or freeze while the process is running and it would than cause some serious problems as this script is going to be running on things as low as 400mhz and better.

Given that senario it would count 16 but it would really be longer and would start it over and over on itself. Atleast in the tests I ran that was the case so I did away with it and tried another route.

I guess what I could do is tell it to read the reg to determine the speed and if below 667 than dont play the music. Its kind of a crap work around but I guess that would work.

Edited by Sublime

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