This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package edu.wpi.first.wpilibj.templates; | |
import edu.wpi.first.wpilibj.DriverStationLCD; | |
import edu.wpi.first.wpilibj.Jaguar; | |
import edu.wpi.first.wpilibj.SimpleRobot; | |
import edu.wpi.first.wpilibj.Timer; | |
import edu.wpi.first.wpilibj.camera.AxisCamera; | |
import edu.wpi.first.wpilibj.camera.AxisCameraException; | |
import edu.wpi.first.wpilibj.image.*; | |
import edu.wpi.first.wpilibj.image.NIVision.MeasurementType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*----------------------------------------------------------------------------*/ | |
/* Copyright (c) FIRST 2008. All Rights Reserved. */ | |
/* Open Source Software - may be modified and shared by FRC teams. The code */ | |
/* must be accompanied by the FIRST BSD license file in the root directory of */ | |
/* the project. */ | |
/*----------------------------------------------------------------------------*/ | |
package edu.wpi.first.wpilibj.templates; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Joystick stick; | |
Jaguar wheel1; | |
Jaguar wheel2; | |
double wheel1Speed; | |
double wheel2Speed; | |
boolean b2, b3, b4, b5; | |
final double INC1 = 0.03; | |
final double INC2 = 0.03; | |
public void robotInit() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ExpandEnvironmentStrings(string){ | |
; Find length of dest string: | |
nSize := DllCall("ExpandEnvironmentStrings", "Str", string, "Str", NULL, "UInt", 0, "UInt") | |
,VarSetCapacity(Dest, size := (nSize * (1 << !!A_IsUnicode)) + !A_IsUnicode) ; allocate dest string | |
,DllCall("ExpandEnvironmentStrings", "Str", string, "Str", Dest, "UInt", size, "UInt") ; fill dest string | |
return Dest | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv | |
Run, Notepad.exe | |
WinWaitActive, ahk_exe Notepad.exe | |
HWND := WinExist() | |
MsgBox, % MessageBox.Show("Hello world!", 2 + 64, "Notepad", 3000, HWND) | |
ExitApp | |
Class MessageBox { | |
Static ID := {1: "OK", 2: "Cancel", 3: "Abort", 4: "Retry", 5: "Ignore", 6: "Yes", 7: "No" | |
, 10: "TryAgain", 11: "Continue"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
changeSelect(var){ | |
Select := 0 | |
Loop Parse, var, `n, `r | |
{ | |
if Trim(A_LoopField) = "Select" | |
Select++ | |
else if RegExMatch(A_LoopField, "i)(\s*)Case\s*else(.*)", $) ;and Select > 0 | |
{ | |
Case%Select%++ | |
out .= $1 (Case%Select% > 1 ? "}" : "") . "else{" . $2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var = | |
( | |
Switch $me | |
Case "a" | |
MsgBox() | |
case 2 to 3 | |
Die() | |
case 4 to 5, 9 to 10, 15, 17 to 20 | |
Switch $you | |
case 14, 90, 100 to 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HotkeySet(Hotkey, FunctionName=""){ | |
Global HotkeySet := Object() | |
if !FunctionName | |
{ | |
Try Hotkey, %Hotkey%, Off | |
return 1 ; Not specified in docs, and hell if I'm installing AU3 | |
} | |
Try Hotkey, %Hotkey%, HotkeySet, On |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv | |
SetWorkingDir %A_ScriptDir% | |
If 0 > 0 ; incoming cmdline parameters | |
fileName = %1% | |
else | |
FileSelectFile, fileName | |
FileRead, file, %fileName% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HotkeySet(Hotkey, FunctionName=""){ | |
Global HotkeySet := Object() | |
if !FunctionName | |
{ | |
Try Hotkey, %Hotkey%, Off | |
return 1 ; Not specified in docs, and hell if I'm installing AU3 | |
} | |
Try Hotkey, %Hotkey%, HotkeySet, On |
NewerOlder