Hotspot problem Thread last updated on 2005-12-09 20:15:11

Posted by member 287251 on 2005-12-05 20:17:19

I have a problem with a hotspot not working the code is:

(theme.rc)

;ckhotspot config
*ckHotspot "0" "0" "-150" "1600" "!Taskbar2Show" "!Taskbar2Hide" "taskbartop" "on"
EndIf


script

*Script bang !Taskbar2Hide
*Script exec !LsBoxMoveBox "taskbar2" "-10" "0" ["1000" "5ms"]
*Script exec !HotSpotAdjust "taskbartop" "0" "0" "0" "-30"
*Script ~bang

*Script bang !Taskbar2Show
*Script exec !LsBoxMoveBox "taskbar2" "0" "0" ["1000" "5ms"]
*Script exec !HotSpotAdjust "taskbartop" "0" "0" "0" "30"
*Script ~bang


LsBox being called

*Label taskbar2

LsBoxName taskbar2
LsBoxX 0
LsBoxY 0
LsBoxUnique
LSBoxDragRect 0 0 0 0
LsBoxHeight 80
LsBoxWidth 790
LsBoxAlwaysOnTop
LsBoxBackGround bar2.bmp

*ModuleHook !VTrayHook
*ModuleHook !VWMLoadBoxHook
*ModuleHook !CommandBoxHook


I cant figure out whats wrong...

Posted by member 212670 on 2005-12-05 21:38:44 link

You have the hotspot's width set to -150.
*ckHotspot x y width height

Posted by member 287251 on 2005-12-05 23:19:44 link

changed it still won't work; wont even move.

Posted by member 1 on 2005-12-05 23:31:54 link

what do you mean by "won't even move"?

Posted by member 287251 on 2005-12-05 23:56:52 link

I mean it doesn't work in the first place. I apoligize for not clarifying as I should have. It just doesn't function when I put the mouse over the hotspot nothing happens.

Posted by member 1 on 2005-12-06 01:33:19 link

Not that this would change anything but your Hide bang also uses a negotive height.

Posted by member 248213 on 2005-12-06 01:46:11 link

in the first snippet, whats the "EndIf" ? (maybe take the hotspot out of that)

Posted by member 287251 on 2005-12-06 15:56:37 link

took out the EndIf and the negative height and both have no effect

Posted by member 248213 on 2005-12-06 16:09:03 link

I hope you meant: "took out the "*ckHotspot "0" "0" "150" "1600" "!Taskbar2Show" "!Taskbar2Hide" "taskbartop" "on"" of the EndIf"

as just removing the "Endif" will result in the rest of your step being munted ie, inside that endif.

Just making it clear ;) (I dont know anything about ckhotspots, so I am trying to help where I can)

Posted by member 287251 on 2005-12-06 16:23:14 link

which EndIf ??

*LsBoxCreate "$ConfigDir$taskbar2.box"
Endif

;ckhotspots config

*ckHotspot "0" "0" "-170" "0" !"xTaskbarHide" !"xTaskbarShow" "taskbarx" "on"
*ckHotspot "0" "0" "150" "790" "!Taskbar2Show" "!Taskbar2Hide" "taskbartop" "on"
EndIf

;mzscript config
mzScriptFile "$ConfigDir$script.rc"
mzAutoSaveVars "Replace"
EndIf

;end config

Posted by member 248213 on 2005-12-06 19:26:57 link

*sigh*

Endif lines end if conditional statements.

There should be an IF something=bool to start it.

So you might have something like this in that file:
IF hotspots=true
*LsBoxCreate "$ConfigDir$taskbar2.box"
Endif

or
IF hotspots=false
some interesting setting
ELSE
*LsBoxCreate "$ConfigDir$taskbar2.box"
Endif


, so having 3 Endif's makes no sense. Especially if you dont know what IF they are ENDIF'ing!

maybe post the whole file and I will fix all your bugs :P

Posted by member 287251 on 2005-12-06 20:29:32 link

What would I use to end the segment ?? End not EndIf ??

Posted by member 248213 on 2005-12-06 21:49:57 link

Endif ends the segment.
is that not clear?

IF
ELSEIF
ELSEIF
ELSEIF
ELSE
ENDIF

Posted by member 1 on 2005-12-06 22:07:05 link

Yes...EndIF would end and IF segment...but you have no IF segment to start with so there is no segment to end. If you must end it with something end it with
;END SEGMENT

Posted by member 248213 on 2005-12-07 01:59:07 link

dev: I am assuming there is an IF segment, but he just hasnt posted that... that would explain the hotspot not working anyway... idk :p

Posted by member 1 on 2005-12-07 12:43:57 link

fractal :: Im going to assume there isn't because of all the endif's that are just laying around. For him to nest those things together doesn't make any sense.

Posted by member 287251 on 2005-12-07 16:16:41 link

So...
*LsBoxCreate "$ConfigDir$taskbar2.box"
;END SEGMENT

;ckhotspots config

*ckHotspot "0" "0" "-170" "0" !"xTaskbarHide" !"xTaskbarShow" "taskbarx" "on"
*ckHotspot "0" "0" "150" "790" "!Taskbar2Show" "!Taskbar2Hide" "taskbartop" "on"
;END SEGMENT

;mzscript config
mzScriptFile "$ConfigDir$script.rc"
mzAutoSaveVars "Replace"
;END SEGMENT

;end config


???

..By the way i'm a she not a he.

Posted by member 1 on 2005-12-07 19:33:20 link

well then that explains everything. :p

If that is what you want it to look like that is fine. As I said earlier...you do not need ;END SEGMENT...it is just a comment.

Posted by member 212670 on 2005-12-07 19:58:07 link

Oh come on... girls don't use Litestep.



(Before I get hate mail, I'm only kidding.)

Posted by member 248213 on 2005-12-07 20:07:37 link

dev: ahhh... I thought maybe she was copying segments...
so its more of a coding style?

RSX-Botan: Sorry for assuming you were a boy, dont get many girls around here.

Is it fixed?

Posted by member 287251 on 2005-12-07 22:52:12 link

No it isn't but i'm going to post the updated code just in case I changed something and X happened.

updated theme.rc
;ckhotspots config

*ckHotspot "0" "0" "-170" "0" !"xTaskbarHide" !"xTaskbarShow" "taskbarx" "on"
*ckHotspot "0" "0" "150" "790" !"Taskbar2Show" !"Taskbar2Hide" "taskbartop" "on"
;END SEGMENT


updated Script

;Script

*Script bang !HotspotON
*Script ~bang

*Script bang !"Taskbar2Hide"
*Script exec !LsBoxMoveBox "taskbar2" "-10" "0" ["1000" "5ms"]
*Script exec !HotSpotAdjust "taskbartop" "0" "0" "0" "-30"
*Script ~bang

*Script bang !"Taskbar2Show"
*Script exec !LsBoxMoveBox "taskbar2" "0" "0" ["1000" "5ms"]
*Script exec !HotSpotAdjust "taskbartop" "0" "0" "0" "30"
*Script ~bang

*Script bang !"xTaskbarHide"
*Script exec !xTaskbarMove "taskbar" "-170" "0" "200" "1280" ["1000" "5ms"]
*Script exec !HotSpotAdjust "taskbarx" "0" "0" "-30" "0"
*Script ~bang

*Script bang !"xTaskbarShow"
*Script exec !xTaskbarReposition "taskbar "170" "0" ["1000" "5ms"]
*Script exec !HotSpotAdjust "taskbarx" "0" "0" "30" "0"
*Script ~bang


same LSBox

*Label taskbar2

LsBoxName taskbar2
LsBoxX 0
LsBoxY 0
LsBoxUnique
LSBoxDragRect 0 0 0 0
LsBoxHeight 80
LsBoxWidth 790
LsBoxAlwaysOnTop
LsBoxBackGround bar2.bmp

*ModuleHook !VTrayHook
*ModuleHook !VWMLoadBoxHook
*ModuleHook !CommandBoxHook


xTaskbar works, taskbar2 is the one not working and isn't moving.

Eh, I got into Litestep and coding becuase its fun and its free. I have a natural knack to take apart and make better things; so to me coding is a obvious choice to do something of the sort with computers. Thats why I do it.. :\

Posted by member 212670 on 2005-12-07 23:27:11 link

"Thats why I do it.. :\ " (can't use italics with that \ in there *** it)

Be proud. Litestep rocks. Change that :\ to a :D

*ckHotspot "0" "0" "-170" "0"

Still using a negative for the width.

*Script bang !HotspotON
*Script ~bang

This is an empty script. It doesn't do anything.

!"Taskbar2Hide"

Remove the quotes so you can call that with just !taskbar2hide. Can you call a bang with !"taskbar2hide" if it's named with quotes in the script? Hmm dunno...

!xTaskbarMove "taskbar" "-170" "0" "200" "1280" ["1000" "5ms"]

Syntax problems there. Unless you meant to use !xTaskbarReposition, it should look like...
!xTaskbarMove taskbar x y 1000 5

(replacing x and y with the coords you want)

That's assuming you've made a custom taskbar named "taskbar", otherwise, you can remove that. Also, the 1000 5 signifies animation. The 1000 is too high (not valid?). I generally find 10 15 works nice.

If you want to check out a bunch of scripting examples, check out my RGB theme's script.rc. I generally layout my scripts fairly neatly.

Posted by member 287251 on 2005-12-08 00:29:43 link

Okay I redid the code again now its

;ckhotspots config

*ckHotspot 0 0 -170 0 !"xTaskbarHide" !"xTaskbarShow" "taskbarx" "on"
*ckHotspot 0 0 150 790 !"Taskbar2Show" !"Taskbar2Hide" "taskbartop" "on"
;END SEGMENT


____________________________________



;Script

*Script bang !"Taskbar2Hide"
*Script exec !LsBoxMoveBox taskbar2 -10 0 10 15
*Script exec !HotSpotAdjust taskbartop 0 0 0 -30
*Script ~bang

*Script bang !"Taskbar2Show"
*Script exec !LsBoxMoveBox taskbar2 0 0 10 15
*Script exec !HotSpotAdjust taskbartop 0 0 0 30
*Script ~bang

*Script bang !"xTaskbarHide"
*Script exec !xTaskbarReposition taskbar 170 0 10 15
*Script exec !HotSpotAdjust taskbarx 0 0 -30 0
*Script ~bang

*Script bang !"xTaskbarShow"
*Script exec !xTaskbarMove taskbar -170 0 200 1280 10 15
*Script exec !HotSpotAdjust taskbarx 0 0 30 0
*Script ~bang


Ignore the negative connataions they're not the problem, they set xtaskbar to come out of the right side of the desktop and it does function. Taskbar2 is supposed to pop out of the top left and isn't working.


edit: fixed it xcal and yes I do read the readmes; I didn't notice it becuase the bar is doing what I want it to do on my desktop so I didn't notice it. Thanks though.

Posted by member 212670 on 2005-12-08 02:19:02 link

I don't mean this to sound ignorant, but have you checked out the readme files for ckhotspots and xtaskbar? I'm not telling you exactly to rtfm, but you have settings that don't make sense. Two that I mentioned specifically are still in your update.

For example, you have !xTaskbarReposition taskbar 170 0 10 15. That would effectively move the taskbar to x=170, y=0 (so a little off the top left of your screen) and resize it to 10px wide, and 15px tall. The syntax is !xTaskbarReposition taskbarname x y width height step time (taskbarname, step, and time are optional). I think what you want there is !xTaskbarMove, and in the other spot, you want !xTaskbarReposition.

edit:
Ok, cool. Glad you worked it out. Keep at it. ;)

Posted by member 1 on 2005-12-08 03:16:00 link

If you are using xTaskbar why are you using Taskbar2? Is there even a Taskbar2? Anywho...why not just define multiple xTaskbar's and be done with it? Or better yet...just move that one taskbar to both positions via !xTaskbarResposition rather than showing/hiding a second whole taskbar. Seems like a lot of extra overhead that you really don't need.

Posted by member 287251 on 2005-12-09 20:15:11 link

Oh becuase its not a taskbar its a box that holds Vtray, VMW, LSX Command, and Amp. It's just an LS Box holding Modules and I need it to move using Hotspot. The name is what I gave it when I wrote it and then changed and intended to but it seemed trival when it wasn't doing what I wanted it to. That and it would add another possible variable to why ckHotspot wasn't working.