Advanced Script Help
Sunday, June 24, 2007 by SirSmiley | Discussion: DesktopX
Instead of using a dozen timers that essentially do the same thing I'm trying to pass the object down through the function call into the sub's but for some reason I can't pass the object name from the function into the respective timer. Any Ideas?
- Const mskT1="mskTab1"
- Const objT1="objTab1"
- Dim speed
- speed=50
- '--Begin Universal Button Functions
- '--Left Click Mouse Selection
- Function Object_OnLbuttonupEx(obj,x,y,dragged)
- With DesktopX
- If Not dragged Then
- Select Case obj.name
- Case objT1
- tBarSlide(mskT1)
- End Select
- End If
- End With
- End Function
- Function tBarSlide(obj)
- With DesktopX
- If .Object(obj).Left >= 0 Then
- object.KillTimer 100
- object.SetTimer 200,speed
- Else
- object.KillTimer 200
- object.SetTimer 100,speed
- End If
- End With
- End Function
- '--Timers
- Sub object_ontimer100
- With DesktopX.Object(obj)
- If .Left < 0 Then
- .Left = .Left + 5
- Else
- object.KillTimer 100
- End If
- End With
- End Sub
- Sub object_ontimer200
- With DesktopX.Object(obj)
- If .Left >=0 Then
- .Left = .Left - 5
- Else
- object.KillTimer 200
- End If
- End With
- End Sub
Reply #2 Sunday, June 24, 2007 7:23 PM
Reply #3 Sunday, June 24, 2007 9:19 PM
Yeah, discovered that. So, it would only be acceptable within limited use. Wonder if there is a way to block the call until the previous call is completed?
Edit: I'm wondering if there's a way to set the other objects to inactive. Like a separate sub?
Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!







Reply #1 Sunday, June 24, 2007 6:29 PM