P. 1
Sample ToggleTouch(With TM2Control)

Sample ToggleTouch(With TM2Control)

|Views: 19|Likes:
Published by Atilla Ceylan

More info:

Published by: Atilla Ceylan on Mar 22, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

03/22/2013

pdf

text

original

; RawInputControlTest.ahk Control definition file. ; Describ Control Settings in this file.

; Lines beginning with a semicolon(;) are ignored as comments. ; Sample file: Toggle touch state with TM2Control.exe ; Copy TM2Control.exe to the same folder as this script. ; Drop this file into RawInputControlTest.ahk ;############################### Window Settings ############################## ; Background color of window. #Window:Color=Black ; Default font color. #Window:FontColor=9B9B9B ; Font color when button is pressed. #Window:ActiveFontColor=00C0FF ; Specify Start-up window position by Left/Right/Top/Bottom. (alone or in combin ation) #Window:Pos=LeftBottom ; You can also specify window position by the coordinate. ;#Window:X=0 ;#Window:Y=0 ; Window size (If not specified, window size will be set automatically.) ;#Window:Width=125 ;#Window:Height=455 ; Margin ;#Window:MarginLeft=0 ;#Window:MarginTop=0 ;#Window:MarginRight=0 #Window:MarginBottom=5 ; Window transparency: Full transparent 0 ~ 255 Opaque #Window:Transparent=200 ;############################## Controls settings ############################# ;--------------------------------- Title bar ---------------------------------; Handle for moving the window. - Control-type: Handle #Control:Handle ; Name the controls. You can use letters and numbers. ; Please take care to avoid overlap with other controls. Name=Handle ; Specify Control`s position. [upper left X-coordinate, upper left Y-coo rdinate, Width, Height] Pos=0, 0, 95, 30 ; Specify the button's caption. Caption= E E E ; Specify Caption position. [X-coordinate, Y-coordinate]. You can also s pecify "Center". CaptionPos=Center, Center ; Specifies the image button is not pressed. Image1=img\n95x30.bmp ; Specifies the image button is pressed. Image2=img\n95x30a.bmp ; Close button. - Control type: Close #Control:Close

Name=Close Pos=95, 0, 30, 30 Caption= ~ CaptionPos=Center, Center Image1=img\n30x30.bmp Image2=img\n30x30aRed.bmp ; You can also specify individual colors for the caption. CaptionColor1=9B9B9B ; Font color when pressed. CaptionColor2=Red ;---------------------------- Touch status display ---------------------------; Slide the position of Controls below. [X-coordinate, Y-coordinate] ; You can specify absolute numbers and put $ in front. #ControlOffset:0, 40 ; Touch-#1 Monitor - Control type: Label ; "Label" is the only control that displays the character string. #Control:Label Name=Static1 Pos=5, 2, 115, 16 Caption=Input1: ; Touch-#2 Monitor - Control type: Label #Control:Label Name=Static2 Pos=5, 20, 115, 16 Caption=Input2: ;------------------------------ Minimize button ------------------------------#ControlOffset:$0, 45 ; Minimize button - Control type: Minimize ; "Minimize" is a control to minimize the window, leaving it-self. #Control:Minimize Name=Minimize ; You can specify the negative value in upper left corner. ; In this example, Control appears only 15 pixels of right side. Pos=-35, 0, 50, 50 ; This is a flag that script starts with minimized state. ( 0...Start no rmally / 1...Minimized startup ) MinimizedStartup=0 Image1=img\50x50.bmp Image2=img\50x50a.bmp ;--------- Toggle button that switches the Touch with TM2Control.exe ---------#ControlOffset:20, 0 ; Toggle touch state button - Control type: ToggleKey ; ToggleKey is a control that toggle the state with short touch, and if you hold this, key state will be On while hold. #Control:ToggleKey Name=ToggleTouch Pos=0, 0, 100, 50 Caption=Toggle Touch ; This is a flag to do not affect other control's operation

NotModify=1 Image1=img\100x50.bmp Image2=img\100x50a.bmp ; By specifying DownCommand/UpCommand instead of DownKey/UpKey, you can run exte rnal programs. DownCommand=TM2control.exe -9 ; UpCommand=TM2control.exe -9 ;-------------------------------- Tools Button -------------------------------#ControlOffset:0, 60 ; Tool1 Button - Control type: Key #Control:Key ; Specify button's name (alphabet and numbers are allowed. Please note d oes not overlap with other controls.) Name=Tool1 ; Specify button's position Pos=0, 0, 50, 50 ; Specify button's caption Caption=Pen ; Specify button's image Image1=img\50x50.bmp ; Specify pressed image Image2=img\50x50a.bmp ; Specify key when touch down DownKey={p Down} ; Specify key when touch up UpKey={p Up} ; App:"App's .exe filename" switches keys while specified application is active App:sai.exe DownKey={n Down} UpKey={n Up} ; Tool2 Button - Control type: Key #Control:Key Name=Tool2 Pos=50, 0, 50, 50 Caption=Eraser Image1=img\50x50.bmp Image2=img\50x50a.bmp DownKey={e Down} UpKey={e Up} ;------------------------------- Vertical Slider -----------------------------#ControlOffset:$0, 55 ; Toggle Slider - Control type: ToggleKey #Control:ToggleKey Name=ToggleWheel Pos=-35, 0, 50, 50 Caption=Roll Image1=img\50x50.bmp Image2=img\50x50a.bmp ; Slider - Control type: VSlider #Control:VSlider Name=Wheel Pos=-35, 50, 50, 200

; Specify steps Step=15 ; Specify slide-down key DownKey={WheelDown} ; Specify slide-up key UpKey={WheelUp} Image1=img\50x200.bmp Image2=img\50x200a.bmp ; Mod:"Control-name" switches keys when "Control-name" is held down ; In this case, the amount of scrolling will be doubled while ToggleWheel is held down Mod:ToggleWheel DownKey={WheelDown 2} UpKey={WheelUp 2} ; Application switch: ComicStudio Pro (Japanese Application) App:CS_Pro.exe DownKey=^{NumpadAdd} UpKey=^{NumpadSub} ; TouchKey is a key that is sent when the touch is released immediatly TouchKey=^0 Mod:ToggleWheel DownKey=UpKey={^} TouchKey=!vvn ; Application switch: SAI App:sai.exe DownKey={PgUp} UpKey={PgDn} TouchKey={Home} Mod:ToggleWheel DownKey={Delete} UpKey={End} TouchKey={Insert} ;---------------------------- Tablet function keys ---------------------------#ControlOffset:20, 0 ; Tab key - Control type: Key #Control:Key Name=Tab Pos=0, 0, 100, 50 Caption=Tab DownKey={Tab Down} UpKey={Tab Up} Image1=img\100x50.bmp Image2=img\100x50a.bmp ; Ctrl key - Control type: ToggleKey #Control:ToggleKey Name=Ctrl Pos=0, 50, 50, 130 Caption=Ctrl DownKey={Ctrl Down} UpKey={Ctrl Up} Image1=img\50x130.bmp Image2=img\50x130a.bmp ; Shift key - Control type: ToggleKey #Control:ToggleKey

Name=Shift Pos=50, 50, 50, 65 Caption=Shift DownKey={Shift Down} UpKey={Shift Up} Image1=img\50x65.bmp Image2=img\50x65a.bmp ; Alt key - Control type: ToggleKey #Control:ToggleKey Name=Alt Pos=50, 115, 50, 65 Caption=Alt DownKey={Alt Down} UpKey={Alt Up} Image1=img\50x65.bmp Image2=img\50x65a.bmp ; Space key - Control type: Key #Control:Key Name=Space Pos=0, 180, 100, 70 Caption=Space DownKey={Space Down} UpKey={Space Up} Image1=img\100x70.bmp Image2=img\100x70a.bmp ;-------------------------------- Undo / Redo --------------------------------#ControlOffset:0, 260 ; Undo key - Control type: Key #Control:Key Name=Undo Pos=0, 0, 50, 50 Caption=Undo ; If key does not need to hold down, specify only DownKey (or only UpKey ) DownKey=^z Image1=img\50x50.bmp Image2=img\50x50a.bmp ; Redo key - Control type: Key #Control:Key Name=Redo Pos=50, 0, 50, 50 Caption=Redo DownKey=^y Image1=img\50x50.bmp Image2=img\50x50a.bmp

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->