Results 1 to 7 of 7
  1. #1
    tirhin's Avatar
    Join Date
    Apr 2015
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    0

    A Simple Question About Ahk

    How can i change the standby trigger shortcut to capslock in the code below?

    Code:
    Gui,Show,x40 y20 w450 h130,TargetID+StandbyTrigger(160229)
    Gui,Font,'MS PGothic'l s14 bold,
    Gui,Add,Text,x14 y10,[CSGO -TargetID+StandbyTrigger-]
    Gui,Font,'MS PGothic'l s10 normal,
    Gui,Add,Text,x14 y30,(※ TargetID Trigger required default dynamic crosshair+hud_showtargetid 1)
    Gui,Add,Text,x14 y50,■[TargetID Trigger]
    Gui,Add,Text,x130 y50,:: MXB2(bind MXB1(mouse4) as +attack)
    Gui,Add,Text,x14 y65,■[Standby Trigger]
    Gui,Add,Text,x130 y65,:: Shift+MXB2/MXB2+MB2(Shift/MB2 can be released.)
    Gui,Add,Text,x14 y80,■[Suspend]
    Gui,Add,Text,x130 y80,:: F10
    Gui,Font,'MS PGothic'l s8 normal,
    Gui,Add,Text,x14 y100,㊞ 4714 江南製造局. U:1:319913330/QQ9609001
    Gui,Add,Text,x28 y110,https://www.mpgh.net/forum/showthread.php?t=1086893
    
    key_Suspend:="F10"
    key_Trigger:="vk06"
    key_StandbyTrigger:="Shift & vk06"
    key_StandbyTrigger2:="vk06 & vk02"
    key_Attack:="vk05"
    key_StandbyAttack:="vk01"
    
    Threshold = 20
    
    hotkey,*~$%key_Suspend%,a0
    hotkey,*~$%key_Trigger%,a1
    hotkey,%key_StandbyTrigger%,a2
    hotkey,%key_StandbyTrigger2%,a2
    return
    
    a0:
    suspend
    return
    
    a1:
    while (GetKeyState(key_Trigger, "P")) {
    	MouseGetPos, MouseX, MouseY
    	PixelGetColor, color, MouseX, MouseY, RGB
    	PixelGetColor, colorz, MouseX, (MouseY+24), RGB
    	;MsgBox The color at the current cursor position is %color%.
    	StringSplit, x, color
    	StringSplit, z, colorz
    	R = 0x%x3%%x4%
    
    	G = 0x%x5%%x6%
    
    	B = 0x%x7%%x8%
    	Rz = 0x%z3%%z4%
    
    	Gz = 0x%z5%%z6%
    
    	Bz = 0x%z7%%z8%
    
    	if (R - 50 > G) or (Rz - 50 > Gz) {
    		send {blind}{%key_Attack% down}
    		sleep 135
    		send {blind}{%key_Attack% up}
    		sleep 15
    	}
    }
    return
    
    a2:
    BlockInput, MouseMove
    sleep 1
    MouseGetPos, MouseX, MouseY
    PixelGetColor, Color2, (MouseX+3), (MouseY-9)
    StringSplit, y, Color2
    Color2B = 0x%y3%%y4%
    Color2G = 0x%y5%%y6%
    Color2R = 0x%y7%%y8%
    Color2B += 0
    Color2G += 0
    Color2R += 0
    sleep 5
    while (GetKeyState(key_Trigger, "P")) {
    	MouseGetPos, MouseX, MouseY
    	PixelGetColor, Color1, (MouseX+3), (MouseY-9)
    	StringSplit, y, Color1
    	Color1B = 0x%y3%%y4%
    	Color1G = 0x%y5%%y6%
    	Color1R = 0x%y7%%y8%
    	Color1B += 0
    	Color1G += 0
    	Color1R += 0
    	if (Color1R > (Color2R + Threshold)) or (Color1R < (Color2R - Threshold)) or (Color1G > (Color2G + Threshold)) or (Color1G < (Color2G - Threshold)) or (Color1B > (Color2B + Threshold)) or (Color1B < (Color2B - Threshold)) {
    		send {blind}{%key_StandbyAttack% down}
    		sleep 135
    		send {blind}{%key_StandbyAttack% up}
    		sleep 15
    		sleep 145
    	}
    }
    BlockInput, MouseMoveOff
    return
    I tried replacing shift & vk06 to "CapsLock" directly, which works normally, but didnt work in this script.Is there something different about it?How can i change the shortcut to CapsLock?

  2. #2
    legit_player's Avatar
    Join Date
    Aug 2015
    Gender
    male
    Location
    /root
    Posts
    313
    Reputation
    10
    Thanks
    2,784
    My Mood
    Cool
    Dont copy+paste, learn how to code. Dont use shit like AHK learn c++, c# or VB.net.

  3. #3
    tirhin's Avatar
    Join Date
    Apr 2015
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    0
    I dont know anything about coding and im not a computer engineer or anything.And i asked for help from the coder of this script and he didnt respond so..

    https://www.mpgh.net/forum/showthread.php?t=1086893

    and this is the original thread.I dont own the code.

  4. #4
    _NightWare's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Location
    Netherlands
    Posts
    724
    Reputation
    274
    Thanks
    2,302
    My Mood
    Inspired
    Take a wild guess...
    Code:
    key_Suspend:="F10"
    key_Trigger:="vk06"
    key_StandbyTrigger:="Shift & vk06"
    key_StandbyTrigger2:="vk06 & vk02"
    key_Attack:="vk05"
    key_StandbyAttack:="vk01"
    Also, most don't like it when they get used as life documentation. You know how to google, you know what lanuage this is written in, add 1 + 1.

    Feel free to leave a thanks or +rep if I helped you.

    ಠ_ರೃ
    Script Squad






    [IMG]https://roblo*****m?rbxp=135887430[/IMG]

  5. #5
    tirhin's Avatar
    Join Date
    Apr 2015
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    0
    I did google it man i learned theyre virtual keys often used by people who dont use a latin alphabet keyboard etc. but couldnt find why typing "capslock" directly doesnt work.

  6. #6
    _NightWare's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Location
    Netherlands
    Posts
    724
    Reputation
    274
    Thanks
    2,302
    My Mood
    Inspired
    Quote Originally Posted by tirhin View Post
    I did google it man i learned theyre virtual keys often used by people who dont use a latin alphabet keyboard etc. but couldnt find why typing "capslock" directly doesnt work.
    Have you even looked at my post?


    /thread
    Last edited by _NightWare; 02-25-2016 at 10:58 AM.

    Feel free to leave a thanks or +rep if I helped you.

    ಠ_ರೃ
    Script Squad






    [IMG]https://roblo*****m?rbxp=135887430[/IMG]

  7. #7
    Hunter's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Location
    Depths Of My Mind.
    Posts
    17,468
    Reputation
    3771
    Thanks
    6,159
    My Mood
    Cheerful
    /Moved to the correct section.

Similar Threads

  1. [Help] Just one simple question about binding; come see!
    By OwnsYou in forum Vindictus Discussions
    Replies: 3
    Last Post: 05-07-2011, 08:59 PM
  2. simple question about rap mus...ic....
    By thesnood in forum Spammers Corner
    Replies: 0
    Last Post: 08-25-2010, 07:25 PM
  3. Simple question about a console command.
    By PP_CrazyApple in forum Call of Duty Modern Warfare 2 Private Servers
    Replies: 1
    Last Post: 07-11-2010, 09:14 AM
  4. Simple question about rez modding
    By BloodSkin in forum Combat Arms Mod Discussion
    Replies: 1
    Last Post: 06-24-2010, 02:12 AM
  5. Simple question about injecting DTX.file.
    By noobdododo in forum Combat Arms Help
    Replies: 4
    Last Post: 06-22-2010, 08:55 PM