Close
Showing results 1 to 9 of 9

Thread: Toggle question

Hybrid View

  1. #1

    Default Toggle question

    I've been reading through the HotKeyNet samples and I have a question about toggling.

    Code:
    <HotKey 1-5>
    	<Toggle>
    		<SendLabel w1>
    			<Key %Trigger%>
    	<Toggle>
    		<SendLabel w2>
    			<Key %Trigger%>
    	<Toggle>
    		<SendLabel w3>
    			<Key %Trigger%>
    	<Toggle>
    		<SendLabel w4>
    			<Key %Trigger%>
    	<Toggle>
    		<SendLabel w5>
    			<Key %Trigger%>
    
    <HotKey 6>
    	<Toggle>
    		<SendLabel w1>
    			<Key %Trigger%>
    	<Toggle>
    		<SendLabel w2>
    			<Key %Trigger%>
    	<Toggle>
    		<SendLabel w3>
    			<Key %Trigger%>
    	<Toggle>
    		<SendLabel w4>
    			<Key %Trigger%>
    	<Toggle>
    		<SendLabel w5>
    			<Key %Trigger%>
    In the above script will 1-5 share a sequence, in other words, if I press 5 and then 3 will it send 5 to w1 and 3 to w2?
    And will 6 be in its own sequence?


    EDIT: I ran some tests and it doesn't seem to work that way
    Each key maintains its own sequence. Pressing 5 and then 4 sends 5 to w1 and 4 to w1. Is there any way to get those keys to share the same sequence?
    The Orcks of War
    Shaman Borck Zorck Dorck Porck Corck
    Mixed Team - Msblonde - Mswhite - Msblack - Msred - Msbrown -

  2. #2

    Default

    hi, yes in theory there is a possibility that they share the toggel, by using <SetToggle>, or with a variable, like this:
    Code:
    <HotKey 1-5>
    <If togglestate is 1>
            	<SetVar togglestate 2>
            	<SendLabel w1>
                     	<Key %Trigger%>
    <Else If togglestate is 2>
             	<SetVar togglestate 3>
            	<SendLabel w2>
                    	<Key %Trigger%>
    <Else If togglestate is 3>
             	<SetVar togglestate 4>
            	<SendLabel w3>
                    	<Key %Trigger%>
    <Else If togglestate is 4>
             	<SetVar togglestate 5>
            	<SendLabel w4>
                    	<Key %Trigger%>
    <Else If togglestate is 5>
             	<SetVar togglestate 1>
            	<SendLabel w5>
                    	<Key %Trigger%>
    <Else>
     	       <SetVar togglestate 2>
            	<SendLabel w1>
                     	<Key %Trigger%>
    ..i hope that works, as i haven't tested it.
    OLIPCS - ordinary life is pretty complex stuff
    ----------------------------------------------------------------
    Pala, Priest, Druid, Hunter, Mage
    Focusless Targetless Leaderless - Wiki
    HotKeyNet - Guide

  3. #3

    Default

    That final else is brilliant. I had to think for a long time to see why you made it 2.
    �Author of HotkeyNet and Mojo

  4. #4

    Default

    If that works I am switching to HKN.
    The Orcks of War
    Shaman Borck Zorck Dorck Porck Corck
    Mixed Team - Msblonde - Mswhite - Msblack - Msred - Msbrown -

  5. #5

    Default

    This thread made me realize that links to SetToggle were missing from the website's pages about Toggle. I just added them.
    �Author of HotkeyNet and Mojo

  6. #6

    Default

    That final else is brilliant. I had to think for a long time to see why you made it 2. :)
    Thanks, the idea came to me, when i was going to write the hole '..to make this work you have to initalize the variable somewhere else..' and than realized, that i could simply do it when none of the other <If>s is matched. It was a little bit like one of the simpsons 'D'oh'-moments, of "why didn't i think earlier about it'.
    OLIPCS - ordinary life is pretty complex stuff
    ----------------------------------------------------------------
    Pala, Priest, Druid, Hunter, Mage
    Focusless Targetless Leaderless - Wiki
    HotKeyNet - Guide

  7. #7

    Default

    If that works I am switching to HKN.
    Btw.: I tested the above, it works perfectly!
    - so welcome to HKN ;)
    OLIPCS - ordinary life is pretty complex stuff
    ----------------------------------------------------------------
    Pala, Priest, Druid, Hunter, Mage
    Focusless Targetless Leaderless - Wiki
    HotKeyNet - Guide

  8. #8

    Default

    Btw.: if you want to reset the togglesequence to its beginning (or to any other step), you could simply define a hotkey for that like:
    Code:
    <Hotkey shift r>
    <SetVariable togglestate 1>
    or to reset to a specific togglesatae like this:
    Code:
    <Hotkey shift 1-5>
       	<SetVar togglestate %TriggerMainKey%>
    OLIPCS - ordinary life is pretty complex stuff
    ----------------------------------------------------------------
    Pala, Priest, Druid, Hunter, Mage
    Focusless Targetless Leaderless - Wiki
    HotKeyNet - Guide

  9. #9

    Default

    Quote Originally Posted by 'olipcs',index.php?page=Thread&postID=199224#post1 99224
    If that works I am switching to HKN.
    Btw.: I tested the above, it works perfectly!
    - so welcome to HKN
    Can I have your babies? I'll be setting up scripts to match my current setup over the weekend
    The Orcks of War
    Shaman Borck Zorck Dorck Porck Corck
    Mixed Team - Msblonde - Mswhite - Msblack - Msred - Msbrown -

Similar Threads

  1. Reverse Toggle
    By wolpak in forum Software Tools
    Replies: 9
    Last Post: 04-09-2009, 10:49 PM
  2. Toggle Hotstrings?
    By Bettysue in forum Software Tools
    Replies: 1
    Last Post: 12-28-2008, 06:11 PM
  3. Toggle key.
    By Fillifjonkan in forum Software Tools
    Replies: 2
    Last Post: 09-19-2008, 12:14 PM
  4. How do you toggle the UI from a script?
    By Maz in forum Macros and Addons
    Replies: 3
    Last Post: 05-16-2008, 01:58 PM
  5. Follow on/off toggle?
    By nowisnothing in forum General WoW Discussion
    Replies: 2
    Last Post: 08-05-2007, 10:51 PM

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •