Announcement

Collapse
No announcement yet.

.skin based command "ONSKINENTER"/"ONSKINEXIT"

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • .skin based command "ONSKINENTER"/"ONSKINEXIT"

    I made mention to this request in some thread awhile back but i honestly cant find it. I think its a warranted command set however. Basically you'd have 2 user-definable exectbl.ini "type" commands in a .skin file

    "ONSKINENTER","DOSOMETHING" Would run upon the skin form being loaded
    "ONSKINEXIT","STOPDOINGSOMETHING" Would run upon the skin being discarded.

    I think they would work well with plugins particularly. Many plugins use pop-up boxes via the MENU; command, but the MENU; command cannot be defined in exectbl.ini as far as i can tell. Therefore, we cannot define a command to run when that MENU; command is executed.

    A real world example of this being used would be with the MobilePhone plugin. When the incoming call .skin file is opened it'd be nice to have a .wav file associated with a ringer indicating a call is incoming. Doing this now seems to be impossible, but with "ONSKINENTER","SAY;Ringer.wav" it would work

    feasible? Make sense?
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  • #3
    Well, you somehow call the skin. Why not put the SAY;Ringer.wav there ?
    Same when you leave the screen. Just add your commands there.
    So just execute your commands before using the MENU command. I Don't really see the problem ?!

    Comment


    • #4
      Originally posted by Konrad View Post
      Well, you somehow call the skin. Why not put the SAY;Ringer.wav there ?
      Same when you leave the screen. Just add your commands there.
      So just execute your commands before using the MENU command. I Don't really see the problem ?!
      the problem is YOU dont call the skin all the time... nor do you always define how a skin is called.

      Mobilephone uses the command MENU;mobilecall.skin whenever an incoming call is discovered. this command can not be user defined via exectbl.ini.

      My upcoming maintenance plugin uses the command MENU;RRVM_popup.skin when your maintenance item is due. A user doesnt control when that command is run. Now i know i can change the command from MENU;RRVM_popup.skin to RRVM_POPUP then use exectbl to define the command... but i'm using my plugin as a second example.

      The request is handy with plugins mostly... where the user doesnt create the event nor the command based on the event.
      mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
      Follow Me on Twitter or Facebook
      Live mp3Car Facebook Chat

      Comment


      • #5
        Originally posted by Enforcer View Post
        I think ONSKINENTER would be confusing.

        I thought you meant when a new skin is started, not an individual screen.

        maybe ONSCREENENTER and ONSCREENEXIT
        that'll work too!
        mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
        Follow Me on Twitter or Facebook
        Live mp3Car Facebook Chat

        Comment


        • #6
          have you tried:

          "ONSCREENCHANGE","SAY;ringer.wav",mobilecall.s kin
          Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

          Comment


          • #7
            This is a relative thing. Generally if you're just using skin code, you can add a command before/after a MENU/LOAD command which does what you need or before/after an EXIT/CANCEL command to do the same. If you're making an extension plugin, then you can simply put a timer in your project to monitor the current screen with RRSDK.GetInfo("RRSCREEN") then you can take actions on screen changes accordingly, furthermore you can monitor the commands that come in from the "ProcessCommand" call so you know that the last screen change was caused by a LOAD/MENU/EXIT/CANCEL command.

            I'm not opposed to adding new events, but we avoid adding what we can as a precaution. Still, there's already a ONSCREENCHANGE event, which is executed right before a screen is about to change -- this may be enough for what you want, in any case if it isn't, give me an example of what you're trying to accomplish and we can definitely work on it.

            For the ringer situation, it really should be done on the plugin side of it (not on the skin side), but it could be done as an extension plugin as well. On the skin side of things, you could use ONSCREENCHANGE to run the command to do what you want on that specific screen like:

            "ONSCREENCHANGE","PLAYSOUND;INCALL.WAV",call_in.sk in

            Or even put a TMR,1 in the call_in.skin and use:

            "TIMER","PLAYSOUND;INCALL.WAV",call_in.skin

            There are even other options available...

            EDIT: Darn it, beat by seconds...
            Ride Runner RR's Myspace

            "Being happy is not about having what you want, it's about wanting what you have."
            "The best things in life are always free - but that doesn't mean money can't buy you good things."

            Comment


            • #8
              Originally posted by Enforcer View Post
              I think ONSKINENTER would be confusing.
              Agreed

              Originally posted by Enforcer View Post
              I thought you meant when a new skin is started, not an individual screen.

              maybe ONSCREENENTER and ONSCREENEXIT
              I think this is going a little over board with the "ON" events... if you really need this, could simply make a PI that watches for either the 'LOAD' or 'MENU' cmds. With using a single var for logic to prevent an indefinite loop.

              We could add an "ONSCREENDISCARD" for when a screen is designated as such or use the sample below...

              Example
              Code:
              Dim ScrnLoading As Boolean
              Dim LoadingCMD AS String
              
              Public Function ProcessCommand(CMD As String, frm As Object) As Integer
                   LoadingCMD = LCase(Left$(CMD,4))
                   If InStr(1,"menu:load")>0 Then
              		If Not ScrnLoading Then
              			ScrnLoading = True
              			If frm.Discardable Then
              				CMD =  "ONSCREENDISCARD||" + CMD
              			Else
              				CMD =  "ONSCREENEXIT||" + CMD
              			End If
              			ProcessCommand = 3
              		Else
              			ScrnLoading = False
              			ProcessCommand = 0
              		End If
              	End If
              End Function
              Same as found in this PI:
              Attached Files
              RideRunner...The #1 FE, PERIOD.

              Current Project: DFXVoice [v1.0 Released]
              Next in line: RRMedia v2.0

              DFX 5.1.1 Skin
              Appstore Link

              My RideRunner Plugins
              RRMedia
              RRExtended
              DFXVoice

              "There are no bugs - only undocumented features."

              Comment


              • #9
                Originally posted by guino
                I'm not opposed to adding new events, but we avoid adding what we can as a precaution. Still, there's already a ONSCREENCHANGE event, which is executed right before a screen is about to change -- this may be enough for what you want, in any case if it isn't, give me an example of what you're trying to accomplish and we can definitely work on it.
                Small correction, the "ONSCREENCHANGE" fires as soon as the screen finishes loading. Including if you have an emb app that takes a few seconds to load, you'll not see that cmd till the screens finished and shown...

                I gave both a example code and even supplied a simple PI that accomplishes what hes after... or anyone else..
                RideRunner...The #1 FE, PERIOD.

                Current Project: DFXVoice [v1.0 Released]
                Next in line: RRMedia v2.0

                DFX 5.1.1 Skin
                Appstore Link

                My RideRunner Plugins
                RRMedia
                RRExtended
                DFXVoice

                "There are no bugs - only undocumented features."

                Comment


                • #10
                  Also, I could add this to RRExtended as that would also fall into extending RR functionality...

                  Let me know, and I'll just include that above one into it....
                  RideRunner...The #1 FE, PERIOD.

                  Current Project: DFXVoice [v1.0 Released]
                  Next in line: RRMedia v2.0

                  DFX 5.1.1 Skin
                  Appstore Link

                  My RideRunner Plugins
                  RRMedia
                  RRExtended
                  DFXVoice

                  "There are no bugs - only undocumented features."

                  Comment

                  Working...
                  X