hexsha
stringlengths
40
40
size
int64
5
1.05M
ext
stringclasses
588 values
lang
stringclasses
305 values
max_stars_repo_path
stringlengths
3
363
max_stars_repo_name
stringlengths
5
118
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringdate
2015-01-01 00:00:35
2022-03-31 23:43:49
max_stars_repo_stars_event_max_datetime
stringdate
2015-01-01 12:37:38
2022-03-31 23:59:52
max_issues_repo_path
stringlengths
3
363
max_issues_repo_name
stringlengths
5
118
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
float64
1
134k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
363
max_forks_repo_name
stringlengths
5
135
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringdate
2015-01-01 00:01:02
2022-03-31 23:27:27
max_forks_repo_forks_event_max_datetime
stringdate
2015-01-03 08:55:07
2022-03-31 23:59:24
content
stringlengths
5
1.05M
avg_line_length
float64
1.13
1.04M
max_line_length
int64
1
1.05M
alphanum_fraction
float64
0
1
8102ad107410cea0a1a670e2e1c42d1af071f830
2,349
ahk
AutoHotkey
src/DgPersistent.ahk
boulmers/DigiHotkey
2d4860a62c3df6d9a6fb487283296f4f3a1500e7
[ "MIT" ]
6
2020-02-29T09:23:27.000Z
2021-12-19T23:56:05.000Z
src/DgPersistent.ahk
boulmers/DigiHotkey
2d4860a62c3df6d9a6fb487283296f4f3a1500e7
[ "MIT" ]
null
null
null
src/DgPersistent.ahk
boulmers/DigiHotkey
2d4860a62c3df6d9a6fb487283296f4f3a1500e7
[ "MIT" ]
null
null
null
/* ; BEGIN EXAMPLE #include ..\lib\json.ahk #include DgObject.ahk #Include Tools.ahk subMain: global obj := new DgPersistent() global obj2 := new DgPersistent() obj.fromFile("..\config\US_Kb.json") obj.toFile( "..\test\Test.json") obj.toRegistry( "HKEY_CURRENT_USER\SOFTWARE\DigiKey", "obj") obj2.fromRegistry( "HKEY_CURRENT_USER\SOFTWARE\DigiKey", "obj") Sleep, 1000 return ; END EXAMPLE */ class DgPersistent extends DgObject { fromRegistry( keyName_, valueName_, mergeData_ := false) { _Logger.BEGIN( A_ThisFunc) RegRead, jsonContent, % keyName_, % valueName_ if( jsonContent ) { data := JSON.Load( jsonContent ) if( mergeData_) { ; add inexistant members ie key/value pairs objectMerge( this, data) } else { objectCopy( this, data) } } _Logger.END( A_ThisFunc) } ;------------------------------------------------------------------------------ toRegistry( keyName_ , valueName_ ) { _Logger.BEGIN( A_ThisFunc) jsonContent := JSON.Dump( this ) RegWrite, REG_SZ, % keyName_, % valueName_, % jsonContent _Logger.END( A_ThisFunc) } ;------------------------------------------------------------------------------ fromJsonFile( jsonFile_, mergeData_ := false ) { _Logger.BEGIN( A_ThisFunc) FileRead, jsonContent, % jsonFile_ if( jsonContent ) { data := JSON.Load( jsonContent ) if( mergeData_) { ; add inexistant members ie key/value pairs objectMerge( this, data) } else { objectCopy( this, data) } } else { _Logger.ERROR( A_ThisFunc , "Failed to load config file ", audioLibFile_ ) return } _Logger.END( A_ThisFunc) } ;------------------------------------------------------------------------------ toJsonFile( jsonFile_ ) { _Logger.BEGIN( A_ThisFunc) if( FileExist(jsonFile_)) { FileSetAttrib, -R, % jsonFile_ FileDelete, % jsonFile_ } jsonContent := JSON.Dump(this, replacer:="", space:= "`t" ) FileAppend, % jsonContent, % jsonFile_ _Logger.END( A_ThisFunc) } }
26.393258
86
0.507024
de80b56ef35ba804eb1cecd52ddb467126fe9d39
24,366
ahk
AutoHotkey
scripts/startup.ahk
satgo1546/dot-product
4d2116f95ef3e56720afe53fcc1e7daf2de52fc9
[ "MIT" ]
null
null
null
scripts/startup.ahk
satgo1546/dot-product
4d2116f95ef3e56720afe53fcc1e7daf2de52fc9
[ "MIT" ]
null
null
null
scripts/startup.ahk
satgo1546/dot-product
4d2116f95ef3e56720afe53fcc1e7daf2de52fc9
[ "MIT" ]
null
null
null
#Warn SetWorkingDir A_ScriptDir ; TODO... Menu, Tray, Icon, D:\Miscellaneous\Icons\classic_MyAHKScript.ico ; If (!GetKeyState("NumLock", "T")) { ; SendEvent {NumLock} ; } capslock_count := 0 last_clipboard := "" on_exit(ExitReason, ExitCode) { If ExitReason == "Logoff" or ExitReason == "Shutdown" { SetNumLockState false SetScrollLockState false } } OnExit on_exit title := "Symbol Palette" key_width4 := 48 key_height := 48 key_width5 := key_width4 * 1.25 key_width6 := key_width4 * 1.5 key_width7 := key_width4 * 1.75 key_width8 := key_width4 * 2 key_width9 := key_width4 * 2.25 key_width11 := key_width4 * 2.75 key_width25 := key_width4 * 6.25 keyboard_gui := Gui(, title) keyboard_gui.Opt("+AlwaysOnTop -Caption +Owner -Theme") hwnd := keyboard_gui.Hwnd keyboard_gui.MarginX := 0 keyboard_gui.MarginY := 0 keyboard_gui.SetFont("s18", "M+ 1c") vkey_buttons1 := keyboard_gui.AddButton("section x0 y0 w" . key_width4 . " h" . key_height . " vkey_button1").OnEvent("Click", button_handler) ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button2, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button3, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button4, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button5, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button6, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button7, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button8, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button9, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button10, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button11, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button12, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button13, ;Gui, Add, Button, x+0 ys w%key_width8% h%key_height% gbutton_handler vkey_button14, ;Gui, Add, Button, section x0 y+0 w%key_width6% h%key_height% gbutton_handler vkey_button15, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button16, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button17, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button18, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button19, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button20, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button21, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button22, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button23, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button24, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button25, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button26, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button27, ;Gui, Add, Button, x+0 ys w%key_width6% h%key_height% gbutton_handler vkey_button28, ;Gui, Add, Button, section x0 y+0 w%key_width7% h%key_height% gbutton_handler vkey_button29, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button30, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button31, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button32, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button33, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button34, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button35, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button36, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button37, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button38, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button39, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button40, ;Gui, Add, Button, x+0 ys w%key_width9% h%key_height% gbutton_handler vkey_button41, ;Gui, Add, Button, section x0 y+0 w%key_width9% h%key_height% gbutton_handler vkey_button42, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button43, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button44, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button45, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button46, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button47, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button48, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button49, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button50, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button51, ;Gui, Add, Button, x+0 ys w%key_width4% h%key_height% gbutton_handler vkey_button52, ;Gui, Add, Button, x+0 ys w%key_width11% h%key_height% gbutton_handler vkey_button53, ;Gui, Add, Button, section x0 y+0 w%key_width5% h%key_height% gbutton_handler vkey_button54, ;Gui, Add, Button, x+0 ys w%key_width5% h%key_height% gbutton_handler vkey_button55, ;Gui, Add, Button, x+0 ys w%key_width5% h%key_height% gbutton_handler vkey_button56, ;Gui, Add, Button, x+0 ys w%key_width25% h%key_height% gbutton_handler vkey_button57, ;Gui, Add, Button, x+0 ys w%key_width5% h%key_height% gbutton_handler vkey_button58, ;Gui, Add, Button, x+0 ys w%key_width5% h%key_height% gbutton_handler vkey_button59, ;Gui, Add, Button, x+0 ys w%key_width5% h%key_height% gbutton_handler vkey_button60, ;Gui, Add, Button, x+0 ys w%key_width5% h%key_height% gbutton_handler vkey_button61, keyboard_gui.Show("xCenter y" . key_height . " Hide") ;SatgosSymbolPalette ;WinSet, AlwaysOnTop, On, ahk_id %hwnd% ; Disable Win key ; Assigning the modifier key to be a “prefix” for at least one other hotkey retains the modifiying function. LWin:: { show_symbol_palette([]) } RWin:: { show_symbol_palette([]) } LWin & CapsLock:: { } RWin & CapsLock:: { } CapsLock:: { global capslock_count capslock_count++ If (capslock_count > 1) { Return } If (GetKeyState("CapsLock", "T")) { SetCapsLockState false } Else { toggle_ime_convmode() ;KeyWait, %A_ThisHotkey%, T0.5 ;If (ErrorLevel) { ;toggle_ime_convmode() ;SetCapsLockState On ;} } } CapsLock Up:: { global capslock_count capslock_count := 0 } multi_tap(characters) { static count If (StrLen(characters) <= 1) { count := 1 SendText characters } Else { send_string := "" If (A_PriorHotkey = A_ThisHotkey && A_TimeSincePriorHotkey < 500) { count += 1 If (count > StrLen(characters)) { count := 1 } send_string .= "{Backspace}" } Else { count := 1 } send_string .= SubStr(characters, count, 1) SendText send_string } } <#+a::multi_tap("ĀÁǍÀÂÄⱭ") <#a:: multi_tap("āáǎàâäɑ") <#+e::multi_tap("ĒÉĚÈÊË") <#e:: multi_tap("ēéěèêë") <#+i::multi_tap("ĪÍǏÌÎÏ") <#i:: multi_tap("īíǐìîï") <#+o::multi_tap("ŌÓǑÒÔÖ") <#o:: multi_tap("ōóǒòôö") <#+u::multi_tap("ŪÚǓÙÛ") <#u:: multi_tap("ūúǔùû") <#+v::multi_tap("ÜǕǗǙǛ") <#v:: multi_tap("üǖǘǚǜ") <#+z::multi_tap("Ẑ") <#z:: multi_tap("ẑ") <#+c::multi_tap("ÇĈ") <#c:: multi_tap("çĉ") ; <#+s::multi_tap("Ŝ") ; <#s:: multi_tap("ŝ") <#+m::multi_tap("Ḿ") <#m:: multi_tap("ḿ") <#+n::multi_tap("Ǹ") <#n:: multi_tap("ǹ") >!+a::Send "Α" >!+b::Send "Β" >!+c::Send "Ψ" >!+d::Send "Δ" >!+e::Send "Ε" >!+f::Send "Φ" >!+g::Send "Γ" >!+h::Send "Η" >!+i::Send "Ι" >!+j::Send "Ξ" >!+k::Send "Κ" >!+l::Send "Λ" >!+m::Send "Μ" >!+n::Send "Ν" >!+o::Send "Ο" >!+p::Send "Π" >!+q::Return >!+r::Send "Ρ" >!+s::Send "Σ" >!+t::Send "Τ" >!+u::Send "Θ" >!+v::Send "Ω" >!+w::Return >!+x::Send "Χ" >!+y::Send "Υ" >!+z::Send "Ζ" >!a::Send "α" >!b::Send "β" >!c::Send "ψ" >!d::Send "δ" >!e::Send "ε" >!f::Send "φ" >!g::Send "γ" >!h::Send "η" >!i::Send "ι" >!j::Send "ξ" >!k::Send "κ" >!l::Send "λ" >!m::Send "μ" >!n::Send "ν" >!o::Send "ο" >!p::Send "π" >!q::Return >!r::Send "ρ" >!s::Send "σ" >!t::Send "τ" >!u::Send "θ" >!v::Send "ω" >!w::Send "ς" >!x::Send "χ" >!y::Send "υ" >!z::Send "ζ" #NumpadSub::Send "−" #HotIf WinActive("ahk_exe LyX.exe") #NumpadAdd::Send "\pm{Space}" #NumpadMult::Send "\times{Space}" #NumpadDiv::Send "\div{Space}" #-::Send "--" #,::Send "\le{Space}" #+,::Send "\leqslant{Space}" #.::Send "\ge{Space}" #+.::Send "\geqslant{Space}" ^1::Send "{^}2{Right}" ^2::Send "\sqrt{Space}" ^/::Send "!mf" ^+/::Send "^+{Left}!mf{Down}" #HotIf WinActive("ahk_exe Mathematica.exe") ^1::Send "^62{Right}" #HotIf #NumpadAdd::Send "±" #NumpadMult::Send "×" #NumpadDiv::Send "÷" #-::Send "–" #,::Send "≤" #+,::Send "⩽" #.::Send "≥" #+.::Send "⩾" #HotIf WinActive("ahk_exe winword.exe") #^0:: #^1:: #^2:: #^3:: #^4:: #^5:: #^6:: #^7:: #^8:: #^9:: { c := SubStr(A_ThisHotkey, 3, 1) Send "^=" . c . "^=" } #+0:: #+1:: #+2:: #+3:: #+4:: #+5:: #+6:: #+7:: #+8:: #+9:: { c := SubStr(A_ThisHotkey, 3, 1) Send "^+=" . c . "^+=" } #HotIf #^0::Send "₀" #^1::Send "₁" #^2::Send "₂" #^3::Send "₃" #^4::Send "₄" #^5::Send "₅" #^6::Send "₆" #^7::Send "₇" #^8::Send "₈" #^9::Send "₉" #+0::Send "⁰" #+1::Send "¹" #+2::Send "²" #+3::Send "³" #+4::Send "⁴" #+5::Send "⁵" #+6::Send "⁶" #+7::Send "⁷" #+8::Send "⁸" #+9::Send "⁹" #[::Send "〖" #]::Send "〗" #HotIf WinExist(keyboard_gui) && False `::button_keydown(1) ` Up::button_keyup(1) 1::button_keydown(2) 1 Up::button_keyup(2) 2::button_keydown(3) 2 Up::button_keyup(3) 3::button_keydown(4) 3 Up::button_keyup(4) 4::button_keydown(5) 4 Up::button_keyup(5) 5::button_keydown(6) 5 Up::button_keyup(6) 6::button_keydown(7) 6 Up::button_keyup(7) 7::button_keydown(8) 7 Up::button_keyup(8) 8::button_keydown(9) 8 Up::button_keyup(9) 9::button_keydown(10) 9 Up::button_keyup(10) 0::button_keydown(11) 0 Up::button_keyup(11) -::button_keydown(12) VKBD Up::button_keyup(12) =::button_keydown(13) VKBB Up::button_keyup(13) q::button_keydown(16) q Up::button_keyup(16) w::button_keydown(17) w Up::button_keyup(17) e::button_keydown(18) e Up::button_keyup(18) r::button_keydown(19) r Up::button_keyup(19) t::button_keydown(20) t Up::button_keyup(20) y::button_keydown(21) y Up::button_keyup(21) u::button_keydown(22) u Up::button_keyup(22) i::button_keydown(23) i Up::button_keyup(23) o::button_keydown(24) o Up::button_keyup(24) p::button_keydown(25) p Up::button_keyup(25) [::button_keydown(26) [ Up::button_keyup(26) ]::button_keydown(27) ] Up::button_keyup(27) \::button_keydown(28) \ Up::button_keyup(28) a::button_keydown(30) a Up::button_keyup(30) s::button_keydown(31) s Up::button_keyup(31) d::button_keydown(32) d Up::button_keyup(32) f::button_keydown(33) f Up::button_keyup(33) g::button_keydown(34) g Up::button_keyup(34) h::button_keydown(35) h Up::button_keyup(35) j::button_keydown(36) j Up::button_keyup(36) k::button_keydown(37) k Up::button_keyup(37) l::button_keydown(38) l Up::button_keyup(38) `;::button_keydown(39) VKBA Up::button_keyup(39) '::button_keydown(40) VKDE Up::button_keyup(40) z::button_keydown(43) z Up::button_keyup(43) x::button_keydown(44) x Up::button_keyup(44) c::button_keydown(45) c Up::button_keyup(45) v::button_keydown(46) v Up::button_keyup(46) b::button_keydown(47) b Up::button_keyup(47) n::button_keydown(48) n Up::button_keyup(48) m::button_keydown(49) m Up::button_keyup(49) ,::button_keydown(50) VKBC Up::button_keyup(50) .::button_keydown(51) VKBE Up::button_keyup(51) /::button_keydown(52) VKBF Up::button_keyup(52) #HotIf #F1:: { show_symbol_palette(["" . "", "∣", "∥", "⟂", "", "", "", "", "", "", "", "∈", "∋", "" , "", "=", "<", ">", "≤", "≥", "≲", "≳", "≦", "≧", "⩽", "⩾", "≃", "" , "", "∼", "≺", "≻", "⪯", "⪰", "≼", "≽", "≾", "≿", "≅", "≆", "" , "", "≈", "⊂", "⊃", "⊆", "⊇", "⫇", "⫈", "⫅", "⫆", "⪋", "" , "", "", "", "", " ", "", "", "" . ""]) } +#F1:: { show_symbol_palette(["" . "", "∤", "∦", "⫽", "", "", "", "", "", "", "", "∉", "∌", "" , "", "≠", "≮", "≯", "≰", "≱", "≴", "≵", "", "", "", "", "", "" , "", "≁", "⊀", "⊁", "⪱", "⪲", "", "", "", "", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", " ", "", "", "" . ""]) } #F2:: { show_symbol_palette(["" . "", "¬", "∧", "∨", "⊕", "⊙", "⊼", "", "", "⊤", "⊥", "±", "∓", "" , "", "∁", "∩", "∪", "∖", "", "", "", "", "", "", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", " ", "", "", "" . ""]) } +#F2:: { show_symbol_palette(["" . "", "¨", "¯", "<", "≤", "=", "≥", ">", "≠", "∨", "∧", "+", "×", "" , "", "?", "⍵", "⍷", "⍴", "∼", "↑", "↓", "⍳", "⍜", "⋆", "←", "→", "" , "", "⍺", "⌈", "⌊", "", "⍙", "⍢", "∘", "'", "⎕", "", "", "" , "", "⊂", "⊃", "∩", "∪", "⊥", "⊤", "∣", "", "", "", "" , "", "", "", "", " ", "", "", "" . ""]) } #F3:: { show_symbol_palette(["" . "⅟", "½", "↉", "⅓", "⅔", "¼", "¾", "⅕", "⅖", "⅗", "⅘", "⅙", "⅚", "" , "", "∵", "∶", "°", "′", "″", "‴", "⁗", "", "", "", "", "", "∎" , "", "∴", "∷", "⩵", "≔", "", "", "", "", "", "", "", "" , "", "∠", "⋕", "⧣", "", "", "", "", "", "", "", "" , "", "", "", "", " ", "", "", "" . ""]) } +#F3:: { show_symbol_palette(["" . "⅐", "⅛", "⅜", "⅝", "⅞", "⅑", "⅒", "", "⁺", "⁽", "⁾", "⁻", "⁼", "" , "", "", "", "", "", "", "", "", "₊", "₍", "₎", "₋", "₌", "" , "", "¹", "²", "³", "⁴", "⁵", "⁶", "⁷", "⁸", "⁹", "⁰", "⁄", "" , "", "₁", "₂", "₃", "₄", "₅", "₆", "₇", "₈", "₉", "₀", "" , "", "", "", "", " ", "", "", "" . ""]) } #F4:: { show_symbol_palette(["" . "", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "", "", "" , "", "", "ς", "ε", "ρ", "τ", "υ", "θ", "ι", "ο", "π", "", "", "" , "", "α", "σ", "δ", "φ", "γ", "η", "ξ", "κ", "λ", "", "", "" , "", "ζ", "χ", "ψ", "ω", "β", "ν", "μ", "", "", "", "" , "", "", "", "", " ", "", "", "" . ""]) } +#F4:: { show_symbol_palette(["" . "", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "", "", "" , "", "", "Σ", "Ε", "Ρ", "Τ", "Υ", "Θ", "Ι", "Ο", "Π", "", "", "" , "", "Α", "Σ", "Δ", "Φ", "Γ", "Η", "Ξ", "Κ", "Λ", "", "", "" , "", "Ζ", "Χ", "Ψ", "Ω", "Β", "Ν", "Μ", "", "", "", "" , "", "", "", "", " ", "", "", "" . ""]) } #F5:: { show_symbol_palette(["" . "⓪", "①", "②", "③", "④", "⑤", "⑥", "⑦", "⑧", "⑨", "⑩", "", "", "" , "", "⑪", "⑫", "⑬", "⑭", "⑮", "⑯", "⑰", "⑱", "⑲", "⑳", "", "", "" , "", "㉑", "㉒", "㉓", "㉔", "㉕", "㉖", "㉗", "㉘", "㉙", "㉚", "", "" , "", "㉛", "㉜", "㉝", "㉞", "㉟", "㊱", "㊲", "㊳", "㊴", "㊵", "" , "", "", "", "", " ", "", "", "" . ""]) } +#F5:: { show_symbol_palette(["" . "🄋", "➀", "➁", "➂", "➃", "➄", "➅", "➆", "➇", "➈", "➉", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "", "", "" , "", "⓵", "⓶", "⓷", "⓸", "⓹", "⓺", "⓻", "⓼", "⓽", "⓾", "", "" , "", "㊶", "㊷", "㊸", "㊹", "㊺", "㊻", "㊼", "㊽", "㊾", "㊿", "" , "", "", "", "", " ", "", "", "" . ""]) } #F6:: { show_symbol_palette(["" . "⓿", "❶", "❷", "❸", "❹", "❺", "❻", "❼", "❽", "❾", "❿", "", "", "" , "", "⓫", "⓬", "⓭", "⓮", "⓯", "⓰", "⓱", "⓲", "⓳", "⓴", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", " ", "", "", "" . ""]) } +#F6:: { show_symbol_palette(["" . "🄌", "➊", "➋", "➌", "➍", "➎", "➏", "➐", "➑", "➒", "➓", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", " ", "", "", "" . ""]) } #F7:: { show_symbol_palette(["" . "●", "◎", "⊙", "○", "■", "◆", "★", "□", "◇", "☆", "", "", "", "" , "", "↖", "↑", "↗", "◤", "▲", "◥", "◸", "△", "◹", "░", "▒", "▓", "█" , "", "←", "↓", "→", "◀", "", "▶", "◁", "", "▷", "", "", "" , "", "↙", "↓", "↘", "◣", "▼", "◢", "◺", "▽", "◿", "", "" , "", "", "", "", " ", "", "", "" . ""]) } +#F7:: { show_symbol_palette(["" . "", "▁", "▂", "▃", "▄", "▅", "▅", "▆", "▇", "█", "", "", "", "" , "", "▘", "▔", "▝", "▛", "▀", "▜", "▉", "▊", "▋", "▌", "▍", "▎", "▏" , "", "▏", "▞", "▕", "▌", "█", "▐", "", "▚", "", "", "", "" , "", "▖", "▁", "▗", "▙", "▄", "▟", "", "", "", "", "" , "", "", "", "", " ", "", "", "" . ""]) } #F8:: { show_symbol_palette(["" . "", "─", "│", "", "━", "┃", "", "═", "║", "", "", "", "", "" , "", "┌", "┬", "┐", "┏", "┳", "┓", "╔", "╦", "╗", "╭", "╮", "╳", "╲" , "", "├", "┼", "┤", "┣", "╋", "┫", "╠", "╬", "╣", "╰", "╯", "" , "", "└", "┴", "┘", "┗", "┻", "┛", "╚", "╩", "╝", "╱", "" , "", "", "", "", " ", "", "", "" . ""]) } +#F8:: { show_symbol_palette(["" . "", "⏜", "⏝", "⎴", "⎵", "⏞", "⏟", "⎪", "⎰", "", "", "", "", "" , "", "⎛", "⎞", "⎡", "⎤", "⎧", "⎫", "⌠", "⎱", "", "", "", "", "" , "", "⎜", "⎟", "⎢", "⎥", "⎨", "⎬", "⎮", "⎲", "", "", "", "" , "", "⎝", "⎠", "⎣", "⎦", "⎩", "⎭", "⌡", "⎳", "", "", "" , "", "", "", "", " ", "", "", "" . ""]) } #F9:: { show_symbol_palette(["" . "🄀", "⒈", "⒉", "⒊", "⒋", "⒌", "⒍", "⒎", "⒏", "⒐", "⒑", "", "", "" , "", "⒒", "⒓", "⒔", "⒕", "⒖", "⒗", "⒘", "⒙", "⒚", "⒛", "", "", "" , "", "⑴", "⑵", "⑶", "⑷", "⑸", "⑹", "⑺", "⑻", "⑼", "⑽", "", "" , "", "⑾", "⑿", "⒀", "⒁", "⒂", "⒃", "⒄", "⒅", "⒆", "⒇", "" , "", "", "", "", " ", "", "", "" . ""]) } +#F9:: { show_symbol_palette(["" . "‥", "⿰", "⿱", "⿲", "⿳", "⿴", "⿵", "⿶", "⿷", "⿸", "⿹", "⿺", "⿻", "" , "", "︻", "︵", "﹇", "︷", "﹃", "﹁", "︱", "¦", "︳", "︴", "‖", "︰", "" , "", "︼", "︶", "﹈", "︸", "﹄", "﹂", " ̄", "﹉", "﹊", "﹋", "﹌", "" , "", "︹", "︺", "︽", "︾", "︿", "﹀", "", "", "﹍", "﹎", "﹏", "" , "", "", "", "", " ", "", "", "" . ""]) } #F10:: { show_symbol_palette(["" . "", "Ⅰ", "Ⅱ", "Ⅲ", "Ⅳ", "Ⅴ", "Ⅵ", "Ⅶ", "Ⅷ", "Ⅸ", "Ⅹ", "Ⅺ", "Ⅻ", "" , "", "ⅰ", "ⅱ", "ⅲ", "ⅳ", "ⅴ", "ⅵ", "ⅶ", "ⅷ", "ⅸ", "ⅹ", "ⅺ", "ⅻ", "" , "", "㈠", "㈡", "㈢", "㈣", "㈤", "㈥", "㈦", "㈧", "㈨", "㈩", "", "" , "", "㊀", "㊁", "㊂", "㊃", "㊄", "㊅", "㊆", "㊇", "㊈", "㊉", "", , "", "", "", "", " ", "", "", "" . ""]) } +#F10:: { show_symbol_palette(["" . "", "", "", "", "", "", "", "", "", "", "", "", "", "" , "", "⚀", "⚁", "⚂", "⚃", "⚄", "⚅", "", "", "", "", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "", "" , "", "☰", "☱", "☲", "☳", "☴", "☵", "☶", "☷", "⚊", "⚋", "" , "", "", "", "", " ", "", "", "" . ""]) } #F11:: { show_symbol_palette(["" . "", "", "", "", "", "", "", "", "", "", "", "", "", "" , "", "§", "№", "℡", "〓", "℃", "℉", "ℓ", "", "", "", "♀", "♂", "" , "", "〃", "々", "〆", "〒", "※", "", "", "", "", "", "", "" , "", "•", "‣", "⁎", "⁑", "†", "‡", "⹋", "℮", "‧", "", "" , "", "", "", "", " ", "", "", "" . ""]) } +#F11:: { show_symbol_palette(["" . "", "", "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", " ", "", "", "" . ""]) } #F21:: { show_symbol_palette(["" . "", "", "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", "", "", "", "", "", "", "", "" , "", "", "", "", " ", "", "", "" . ""]) } #F12:: { show_symbol_palette(["" . "``", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "⌫" , "↹", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[", "]", "\" , "⇬", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'", "↵" , "⇧", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "⇧" , "^", "⌘", "⌥", " ", "⌥", "⌘", "❖", "^" . ""]) } +#F12:: { show_symbol_palette(["" . "``", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "⌫" , "↹", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "[", "]", "\" , "⇬", "A", "S", "D", "F", "G", "H", "J", "K", "L", ";", "'", "↵" , "⇧", "Z", "X", "C", "V", "B", "N", "M", ",", ".", "/", "⇧" , "^", "⌘", "⌥", " ", "⌥", "⌘", "❖", "^" . ""]) } button_keydown(number) { ControlClick "x1 y1", "key_button" . number, , , , "D" button_event(number) } button_keyup(number) { ControlClick "x1 y1", "key_button" . number, , , , "U" } button_handler(control, info) { button_event(SubStr(control.Name, 11)) } button_event(number) { ;GuiControlGet, symbol, , key_button%number%, Text Send "%" } show_symbol_palette(symbols) { global hwnd If (symbols.Length > 0) { For index, symbol in symbols { ;GuiControlGet, button_enabled, Enabled, key_button%index% button_enabled := 0 If (button_enabled) { ;GuiControl, Text, key_button%index%, %symbol% } } keyboard_gui.Show("NA") ;WinSet, Transparent, 192, ahk_id %hwnd% } Else { keyboard_gui.Hide() } } set_next_input_language() { WinExist("A") PostMessage 0x50, 4, , ControlGetFocus() } toggle_ime_convmode() { current_convmode := get_ime_convmode() ; 默认为英文状态,则转换模式为268435456。 If (current_convmode = 0 || current_convmode = 0x10000000) { set_ime_convmode(1) } Else { set_ime_convmode(0) } } set_ime_convmode(mode) { SendMessage 0x0283 ; Message = WM_IME_CONTROL , 0x0002 ; wParam = IMC_SETCONVERSIONMODE , mode ; lParam = CONVERSIONMODE , DllCall("imm32\ImmGetDefaultIMEWnd", "UInt", WinExist("A")) } get_ime_convmode() { Return SendMessage(0x0283 ; Message = WM_IME_CONTROL , 0x0001 ; wParam = IMC_GETCONVERSIONMODE , 0 ; lParam = 0 , DllCall("imm32\ImmGetDefaultIMEWnd", "Uint", WinExist("A"))) } text_to_tex(str) { ; StrReplace不好用,因为它不知道区不区分大小写 str := RegExReplace(str, "“", "````") str := RegExReplace(str, "”", "''") str := RegExReplace(str, "‘", "``") str := RegExReplace(str, "’", "'") str := RegExReplace(str, "\bLaTeX\b", "\LaTeX{}") str := RegExReplace(str, "TeX\b", "\TeX{}") str := RegExReplace(str, "\bTeXbook\b", "\TeX book") str := RegExReplace(str, "\bMETAFONT\b", "\MF{}") str := RegExReplace(str, "\bMETAFONTbook\b", "\MF book") str := RegExReplace(str, "−", "--") str := RegExReplace(str, "—", "---") str := RegExReplace(str, "i)\bPh\.\s?D\. ", "Ph.D.\ ") str := RegExReplace(str, "\b(Miss|Ms|Mrs?|cf|v\.?s)\.\s", "$1.~") str := RegExReplace(str, Chr(160), "~") str := RegExReplace(str, "%", "\%") str := RegExReplace(str, "i)(?:https?|s?ftps?|git|telnet)://[\w~!@#\$%\^&\*\(\)\[\]\{\}<>,\./\?=\+:;`"'-]{4,2083}", "\url{$0}") str := RegExReplace(str, "(\w)\s&\s(\w)", "$1 \& $2") str := RegExReplace(str, "$(\d)", "\$$$1") str := RegExReplace(str, "#(\d)", "\#$1") str := RegExReplace(str, "<em>(.+?)</em>", "\emph{$1}") Return str } XButton1::Return XButton2::Return Launch_App1::Return Launch_App2::Return Media_Next::Return Media_Prev::Return Media_Play_Pause::Return Media_Stop:: { If ProcessExist("baidunetdisk.exe") + ProcessExist("uget.exe") + ProcessExist("uTorrent.exe") { result := MsgBox, 0x131, "睡眠", "还有下载任务。睡眠吗?" } Else { result := MsgBox, 0x1, "睡眠", "睡眠吗?" } If result == "OK" { ; Parameter #1: Pass 1 instead of 0 to hibernate rather than suspend. ; Parameter #2: Pass 1 instead of 0 to suspend immediately rather than asking each application for permission. ; Parameter #3: Pass 1 instead of 0 to disable all wake events. DllCall("PowrProf\SetSuspendState", "Int", 0, "Int", 0, "Int", 0) } } Browser_Back::Send "{Volume_Down}" Browser_Forward::Send "{Volume_Up}" Browser_Home::Return Launch_Mail:: { global last_clipboard If (last_clipboard == Clipboard) { ToolTip "已经转换过了。" } Else { last_clipboard := text_to_tex(Clipboard) Clipboard := last_clipboard ToolTip "将剪贴板文本转换为 LaTeX 格式。" } SetTimer RemoveToolTip, -1000 } RemoveToolTip() { ToolTip }
31.562176
142
0.472174
072bab7f14920bdc5b3f221e0534402098922261
1,673
ahk
AutoHotkey
PullSlips.ahk
MrJeremyHobbs/PullSlips-Alma
d7df154d2c346db998edb192c733ab076ef29b75
[ "MIT" ]
null
null
null
PullSlips.ahk
MrJeremyHobbs/PullSlips-Alma
d7df154d2c346db998edb192c733ab076ef29b75
[ "MIT" ]
null
null
null
PullSlips.ahk
MrJeremyHobbs/PullSlips-Alma
d7df154d2c346db998edb192c733ab076ef29b75
[ "MIT" ]
null
null
null
;Start; saveFile = PullSlips.docx FileDelete %saveFile% ;Configurations Iniread, download_directory, config.ini, general, download_directory Iniread, version, config.ini, general, version ;Check for Template.docx IfNotExist, Template.docx { msgbox Cannot find Template.docx exit } ;Get input file FileSelectFile, xlsFile,,C:\Users\%A_UserName%\Downloads\, PullSlips %version% - Select File, *.xls* ;Check for input file or cancel to exit If xlsFile = { exit } ;Open XLS file xl := ComObjCreate("Excel.Application") xl.Visible := False book := xl.Workbooks.Open(xlsFile) rows := book.Sheets(1).UsedRange.Rows.Count ;Sort by HeldFor Column xlAscending := 1 xlYes := 1 book.Sheets(1).UsedRange.Sort(Key1 := xl.Range("I2") , Order1 := xlAscending,,,,, , Header := xlYes) ;Save and quit XLS file book.Save() book.Close xl.Quit ;Progress Progress, zh0 fs12, Generating Slips...,,PullSlips ;Open DOC file template = %A_ScriptDir%\Template.docx saveFilePath = %A_ScriptDir%\%saveFile% wrd := ComObjCreate("Word.Application") wrd.Visible := False ;Perform Mail Merge doc := wrd.Documents.Open(template) doc.MailMerge.OpenDataSource(xlsFile,,,,,,,,,,,,,"SELECT * FROM [expiredHoldShelfRequestsList$] WHERE [Location] = 'ILLIAD' OR [Location] = 'Resource Sharing Long Loan' OR [Location] = 'Resource Sharing Short Loan'") doc.MailMerge.Execute ;Save and quit DOC file wrd.ActiveDocument.SaveAs(saveFilePath) wrd.DisplayAlerts := False doc.Close wrd.Quit ;Progress Progress, zh0 fs12, Sending to Word...,,PullSlips ;Finish IfNotExist, %saveFile% { msgbox Cannot find %saveFile% exit } ;FileDelete %xlsFile% FileDelete %xlsFile% run winword.exe %saveFile%
22.608108
216
0.741781
dca9e01ab6f27add63f5a82479ae6e33859d8057
631
au3
AutoIt
autoit/Examples/Helpfile/SplashTextOn.au3
dborio/ShitDeck
a2c9794fb66e1a0c66317fd478be446dc781976a
[ "MIT" ]
21
2019-10-24T04:59:52.000Z
2021-05-11T12:47:17.000Z
autoit/Examples/Helpfile/SplashTextOn.au3
dborio/ShitDeck
a2c9794fb66e1a0c66317fd478be446dc781976a
[ "MIT" ]
null
null
null
autoit/Examples/Helpfile/SplashTextOn.au3
dborio/ShitDeck
a2c9794fb66e1a0c66317fd478be446dc781976a
[ "MIT" ]
9
2019-10-26T16:56:08.000Z
2021-03-15T14:10:21.000Z
#include <AutoItConstants.au3> SplashTextOn("Title", "Message goes here.", -1, -1, -1, -1, $DLG_TEXTLEFT, "", 24) Sleep(3000) SplashOff() ; ; FLICKER Local $sMessage = "" SplashTextOn("TitleFoo", $sMessage, -1, -1, -1, -1, $DLG_TEXTLEFT, "") For $i = 1 To 20 $sMessage = $sMessage & $i & @CRLF SplashTextOn("TitleFoo", $sMessage, -1, -1, -1, -1, $DLG_TEXTLEFT, "") Sleep(100) Next ; ; SMOOTH $sMessage = "" SplashTextOn("TitleFoo", $sMessage, -1, -1, -1, -1, $DLG_TEXTLEFT, "") For $i = 1 To 20 $sMessage = $sMessage & $i & @CRLF ControlSetText("TitleFoo", "", "Static1", $sMessage) Sleep(100) Next
26.291667
83
0.602219
c013ac6ea35c2a54237c18f84a3eb0c48116264f
3,140
au3
AutoIt
Attachments/15K-16K/5000-6000/15938/facebookprinter.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
3
2021-01-19T19:13:50.000Z
2021-06-20T15:29:16.000Z
Attachments/15K-16K/5000-6000/15938/facebookprinter.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
Attachments/15K-16K/5000-6000/15938/facebookprinter.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
Global $p1[2]=[0,0] Global $p2[2]=[0,0] Global $beg[2]=[0,0] $var = PixelGetColor( 100 , 100 ) Global $pause=False Global $step=1 HotKeySet("^,", "click") HotKeySet("^.}","print") HotKeySet("^/","begin") HotKeySet("^'","pause") Func pause() $pause = NOT $pause While $pause Sleep(1000) WEnd EndFunc Func begin() $beg=MouseGetPos() EndFunc Func click() If $p1[0]=0 Then Global $p1=MouseGetPos () ElseIf $p2[0]=0 Then Global $p2=MouseGetPos() EndIf EndFunc While $p2[0]=0 Sleep(100) ;waiting for click() 2x WEnd Global $width=$p2[0]-$p1[0] Global $height=$p2[1]-$p1[1] Global $Image, $Palette, $colnum $colnum=2 Dim $Image[$width][$height][$colnum] Dim $Palette[$colnum] $Palette[0]=0 Sleep(1000) For $x=$p1[0] to Int(($p2[0]-1)/$step) For $y=$p1[1] to Int(($p2[1]-1)/$step) $Image[$x-$p1[0]][$y-$p1[1]][0]=PixelGetColor( $x*$step , $y*$step ) ;throw pixel data into an array Next Next For $x=0 to $width-1 For $y=0 to $height-1 $added=False For $c=1 to $colnum-1 If $Palette[$c]=$Image[$x][$y][0] Then $Image[$x][$y][$c]=1 $added=True $c=$colnum-1 EndIf Next If NOT $added Then $colnum+=1 ReDim $Palette[$colnum] $Palette[$colnum-1]=$Image[$x][$y][0] ReDim $Image[$width][$height][$colnum] $Image[$x][$y][$colnum-1]=1 EndIf Next Next MsgBox(4096, "Test",$colnum, 360) Global $askPrint=False While $askPrint=False Sleep(100) WEnd Func print() While $beg[0]=0 Sleep(100) WEnd $askPrint=True $curcol=0 $pi=3.14159 Dim $curcolh, $thiscolor For $c=1 to $colnum-1 ;cycle through colors $thiscolor = $Palette[$c] if colordif($thiscolor,Dec("ffffff"))<50 Then $c+=1 $thiscolor = $Palette[$c] EndIf MouseClick("left",397,549) ; this needs to be adjusted for your screen resolution and browser. $curColh=Hex($thiscolor) Sleep(100) Send("{END}") Send("{END}{BS}{BS}{BS}{BS}{BS}{BS}{BS}") Send(StringMid($curColh,3,8)) Sleep(500) Send("{ENTER}") Sleep(50) For $x=0 to $width-1 For $y=0 to $height-1 If $Image[$x][$y][$c]=1 Then MouseMove($x*$step+$beg[0],$y*$step+$beg[1],1) MouseDown("left") $Image[$x][$y][$c]=0 ;new $xP=$x ;temporary x and y values $yP=$y ;for finding a line to draw $go=True While $go $go=False $temp=Random(1,8) For $p=$temp to $temp+7 $tx=Round(Cos($pi*$p/4),0) $ty=Round(Sin($pi*$p/4),0) If $xP+$tx<$width-1 AND $xP+$tx>0 AND $yP+$ty<$height-1 AND $yP+$ty>0 AND $go=False Then ;making sure indices are in range If $Image[$xP+$tx][$yP+$ty][$c]=1 AND $go=False Then $xP+=$tx $yP+=$ty $p=8 MouseMove($xP*$step+$beg[0],$yP*$step+$beg[1],1) $Image[$xP][$yP][$c]=0 $go=True EndIf EndIf Next ;end checking around WEnd MouseUp("left") EndIf Next Next Next EndFunc Func colordif($color1,$color2) $hstring=Hex($color1) $hstring2=Hex($color2) $R1=Dec(StringMid($hstring,1,2)) $G1=Dec(StringMid($hstring,3,2)) $B1=Dec(StringMid($hstring,5,2)) $R2=Dec(StringMid($hstring2,1,2)) $G2=Dec(StringMid($hstring2,3,2)) $B2=Dec(StringMid($hstring2,5,2)) Return Abs($R1-$R2)+Abs($G1-$G2)+Abs($B1-$B2) EndFunc
22.269504
100
0.612739
45855fa30ac67293b4d67f7cd75b99547a47e639
14,365
au3
AutoIt
Attachments/15K-16K/5000-6000/15856/Atom_v0.00_.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
3
2021-01-19T19:13:50.000Z
2021-06-20T15:29:16.000Z
Attachments/15K-16K/5000-6000/15856/Atom_v0.00_.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
Attachments/15K-16K/5000-6000/15856/Atom_v0.00_.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
#include <GUIConstants.au3> #include <Array.au3> AutoItSetOption("GUIOnEventMode",1) HotKeySet("{esc}","die") Func die() Exit EndFunc ;Atomic Constants Const $Mass_Electron = 9.1093897 * 10^(-31), $Mass_Neutron = 1.6749286 * 10^(-27), $Mass_Proton = 1.6726231 * 10^(-27), $Universal_Gravity_Constant = 6.67259 * 10^(-11) ;Program Constants Const $dim_max_particles = 256,$dim_particle_stats = 10, $pi = 3.14159265358979, $degToRad = $pi / 180, $View = 1000,$pan_const = 100 Global $Window_Size[2], $Graphic, $pan[6],$Redraw = True, $enter,$restart= False $Window_Size[0] = @DesktopWidth $Window_Size[1] = @DesktopHeight $pan[2] = -1000 ;Particle_Arrays Global $Particle[$dim_max_particles][$dim_particle_stats] ;Particle_X, Particle_Y, Particle_Z, ;Particle_dX, Particle_dY, Particle_dZ ;Particle_Mass, Particle_Radius, Particle_Color, Particle_Type ;Run Related Global $Num_Particle_Min = 20, $Num_Particle_Current = 0, $Dist_Max = 1000, $Dist_Start = 1000, $Size_Particle_Min = 10 , $Size_Particle_Max = 20 Global $Filled , $empty, $atomic = False, $Speed_Max = .4, $Gravity = .1,$axis[3][2][20],$select[3] Get_Data() Initialize() Main() ;the Bulk Func Get_Data() Local $a, $b, $c Local $up_down_changer=5, $spacing =5, $item = 0, $height = 20, $buff =5 $go_now = 1 GUICreate("Settings",$buff * 2 + 160, $buff*2 + 9 * ($height + $spacing)) $Gravity = GUICtrlCreateInput($Gravity * 100,100 + $buff,($height + $spacing) * $item + $buff,60,$height) GUICtrlCreateUpdown($Gravity) GUICtrlCreateLabel("Gravity Constant",$buff,$up_down_changer + ($height + $spacing) * $item + $buff,100,$height) $item = $item + 1 ;$repul_const = GUICtrlCreateInput($repul_const*100,100 + $buff,($height + $spacing) * $item + $buff,60,$height) ;GUICtrlCreateUpdown($repul_const) ;GUICtrlCreateLabel("Repulsion Constant",$buff,$up_down_changer + ($height + $spacing) * $item + $buff,100,$height) ;$item = $item + 1 $Speed_Max = GUICtrlCreateInput($Speed_Max*50,100 + $buff,($height + $spacing) * $item + $buff,60,$height) GUICtrlCreateUpdown($Speed_Max) GUICtrlCreateLabel("Max Init. Speed",$buff,$up_down_changer + ($height + $spacing) * $item + $buff,100,$height) $item = $item + 1 $Size_Particle_Min = GUICtrlCreateInput($Size_Particle_Min,100 + $buff,($height + $spacing) * $item + $buff,60,$height) GUICtrlCreateUpdown($Size_Particle_Min) GUICtrlCreateLabel("Minimum Mass",$buff,$up_down_changer + ($height + $spacing) * $item + $buff,100,$height) $item = $item + 1 $Size_Particle_Max = GUICtrlCreateInput($Size_Particle_Max,100 + $buff,($height + $spacing) * $item + $buff,60,$height) GUICtrlCreateUpdown($Size_Particle_Max) GUICtrlCreateLabel("Maximum Mass",$buff,$up_down_changer + ($height + $spacing) * $item + $buff,100,$height) $item = $item + 1 $Dist_Start = GUICtrlCreateInput($Dist_Start,100 + $buff,($height + $spacing) * $item + $buff,60,$height) GUICtrlCreateUpdown($Dist_Start) GUICtrlCreateLabel("Starting Distance",$buff,$up_down_changer + ($height + $spacing) * $item + $buff,100,$height) $item = $item + 1 ;$Dist_Max = GUICtrlCreateInput($Dist_Max,100 + $buff,($height + $spacing) * $item + $buff,60,$height) ;GUICtrlCreateUpdown($Dist_Max) ;GUICtrlCreateLabel("Maximum Distance",$buff,$up_down_changer + ($height + $spacing) * $item + $buff,100,$height) ;$item = $item + 1 $Num_Particle_Current = GUICtrlCreateInput($Num_Particle_Min - $Num_Particle_Min,100 + $buff,($height + $spacing) * $item + $buff,60,$height) GUICtrlCreateUpdown($Num_Particle_Current) GUICtrlCreateLabel("Extra Initial Particles",$buff,$up_down_changer + ($height + $spacing) * $item + $buff,100,$height) $item = $item + 1 $Num_Particle_Min = GUICtrlCreateInput($Num_Particle_Min,100 + $buff,($height + $spacing) * $item + $buff,60,$height) GUICtrlCreateUpdown($Num_Particle_Min) GUICtrlCreateLabel("Minimum Particles",$buff,$up_down_changer + ($height + $spacing) * $item + $buff,100,$height) $item = $item + 1 HotKeySet("{numpadsub}") HotKeySet("{numpadadd}") HotKeySet("{numpad0}") HotKeySet("{numpad1}") HotKeySet("{numpad2}") HotKeySet("{numpad3}") HotKeySet("{numpad4}") HotKeySet("{numpad5}") HotKeySet("{numpad6}") HotKeySet("{numpad7}") HotKeySet("{numpad8}") HotKeySet("{numpad9}") GUICtrlSetOnEvent(GUICtrlCreateButton("Build My Universe!",$buff,$up_down_changer + ($height + $spacing) * $item + $buff,160,45),"enter") GUISetState() HotKeySet("{enter}","enter") GUISetOnEvent($GUI_EVENT_CLOSE, "die") $enter = False While Not $enter Sleep (100) WEnd HotKeySet("{enter}") $Gravity = GUICtrlRead($Gravity)/100 $Speed_Max = GUICtrlRead($Speed_Max)/50 $Size_Particle_Min = GUICtrlRead($Size_Particle_Min);^3 * (4/3) * $pi $Size_Particle_Max = GUICtrlRead($Size_Particle_Max);^3 * (4/3) * $pi $Dist_Start = GUICtrlRead($Dist_Start) ;$Dist_Max = GUICtrlRead($Dist_Max) $Num_Particle_Current = GUICtrlRead($Num_Particle_Current) $Num_Particle_Min = min(GUICtrlRead($Num_Particle_Min),$dim_max_particles) GUIDelete() For $a = 0 to 4 $pan[$a] = 0 Next $pan[5] = -$Dist_Start * 2 $select[1] = -1 $select[2] = -1 EndFunc Func Initialize() Local $a,$b,$c,$d,$e dim $Filled[1] dim $empty[$dim_max_particles+1] dim $Particle[$dim_max_particles][$dim_particle_stats] for $a = 1 to $dim_max_particles $empty[$a] = $a Next $empty[0] = $dim_max_particles $b = $Num_Particle_Current $Num_Particle_Current = 0 for $a = 0 to $Num_Particle_Min + $b add_particle() Next GUICreate(@ScriptName,$Window_Size[0],$Window_Size[1]) GUISetBkColor(0x000000) $Graphic = GUICtrlCreateGraphic(0,0,$Window_Size[0],$Window_Size[1]) GUISetState() HotKeySet("\","restart") HotKeySet("{numpadsub}","zoom_out") HotKeySet("{numpadadd}","zoom_in") HotKeySet("{numpad4}","left") HotKeySet("{numpad8}","up") HotKeySet("{numpad6}","right") HotKeySet("{numpad2}","down") HotKeySet("{numpaddiv}","select_inc") HotKeySet("{numpadmult}","select_dec") HotKeySet("{numpad5}","select_mode") HotKeySet("{numpad7}","color_mode") EndFunc Func Main() While 1 if $Num_Particle_Current < $Num_Particle_Min then add_particle() Calculate() Render() if $restart then GUIDelete() Get_Data() Initialize() $restart = False EndIf WEnd EndFunc Func Calculate() Local $a,$b,$c,$d,$e,$f,$g,$Dotted =0,$Marked_Men[1][2] Local $dx, $dy, $dz, $dxyz For $f1 = 1 to $Filled[0] $a = $Filled[$f1] for $f2 = $f1 + 1 to $Filled[0] $b = $Filled[$f2] $dx = $Particle[$a][1] - $Particle[$b][1] $dy = $Particle[$a][2] - $Particle[$b][2] $dz = $Particle[$a][3] - $Particle[$b][3] $dxyz = Sqrt( $dx^2 + $dy^2 + $dz^2) + .0001 if $dxyz > $Particle[$a][8] + $Particle[$b][8] then $g = $Gravity * $Particle[$a][7] * $Particle[$b][7] * $dxyz^-2 $f = $g * ($Particle[$b][7]/($Particle[$a][7]+$Particle[$b][7])) $Particle[$a][4] -= $f * $dx $Particle[$a][5] -= $f * $dy $Particle[$a][6] -= $f * $dz $f = $g * ($Particle[$a][7]/($Particle[$a][7]+$Particle[$b][7])) $Particle[$b][4] += $f * $dx $Particle[$b][5] += $f * $dy $Particle[$b][6] += $f * $dz Else $Dotted += 1 ReDim $Marked_Men[$Dotted][2] $Marked_Men[$Dotted -1][0] = $f1 $Marked_Men[$Dotted -1][1] = $f2 EndIf Next Next for $a = 0 to $Dotted - 1 $b = Int($Filled[$Marked_Men[$Dotted - $a-1][0]]) $c = Int($Filled[$Marked_Men[$Dotted - $a-1][1]]) if $Particle[$b][7] < $Particle[$c][7] Then $Particle[$b][9] = $Particle[$c][9] $Particle[$b][1] = ($Particle[$b][1] * $Particle[$b][7] + $Particle[$c][1] * $Particle[$c][7])/($Particle[$c][7] + $Particle[$b][7]) $Particle[$b][2] = ($Particle[$b][2] * $Particle[$b][7] + $Particle[$c][2] * $Particle[$c][7])/($Particle[$c][7] + $Particle[$b][7]) $Particle[$b][3] = ($Particle[$b][3] * $Particle[$b][7] + $Particle[$c][3] * $Particle[$c][7])/($Particle[$c][7] + $Particle[$b][7]) $Particle[$b][4] = ($Particle[$b][4] * $Particle[$b][7] + $Particle[$c][4] * $Particle[$c][7])/($Particle[$c][7] + $Particle[$b][7]) $Particle[$b][5] = ($Particle[$b][5] * $Particle[$b][7] + $Particle[$c][5] * $Particle[$c][7])/($Particle[$c][7] + $Particle[$b][7]) $Particle[$b][6] = ($Particle[$b][6] * $Particle[$b][7] + $Particle[$c][6] * $Particle[$c][7])/($Particle[$c][7] + $Particle[$b][7]) $Particle[$b][7] += $Particle[$c][7] $Particle[$b][8] = ((3/4) * $Particle[$b][7])^(1/3) $Particle[$c][7] = 0 if $select[0] = $c then $select[0] = $b if $select[2] = 1 then Color_Shift($b) $Filled[$Marked_Men[$Dotted - $a-1][1]] += .001 Next $a = 0 While ($a < UBound($Filled)-1) and ($Dotted > 0) $a += 1 if $Filled[$a] > Int($Filled[$a]) Then _ArrayAdd($empty,Int($Filled[$a])) _ArrayDelete($Filled,$a) $Filled[0] -= 1 $Dotted -= 1 $Num_Particle_Current -= 1 EndIf WEnd For $f1 = 1 to $Filled[0] $a = $Filled[$f1] $Particle[$a][1] += $Particle[$a][4] $Particle[$a][2] += $Particle[$a][5] $Particle[$a][3] += $Particle[$a][6] Next EndFunc Func Render() Local $Pre_Render[$Filled[0]][3], $a,$b,$c,$d if $select[1] = 1 Then $pan[0] = ($pan[0] + $Particle[$select[0]][1])/2 + $pan[3] $pan[1] = ($pan[1] + $Particle[$select[0]][2])/2 + $pan[4] $pan[2] = ($pan[2] + $Particle[$select[0]][3])/2 + $pan[5] Else $pan[0] = $pan[3] $pan[1] = $pan[4] $pan[2] = $pan[5] EndIf For $a = 1 to $Filled[0] $b = Calc_Render($Particle[$Filled[$a]][1],$Particle[$Filled[$a]][2],$Particle[$Filled[$a]][3],$Particle[$Filled[$a]][8]) $Pre_Render[$a -1][0] = $b[0] $Pre_Render[$a -1][1] = $b[1] $Pre_Render[$a -1][2] = $b[2] Next GUICtrlDelete($Graphic) GUICtrlCreateGraphic(0,0,$Window_Size[0],$Window_Size[1]) GUICtrlSetBkColor($Graphic,0x000000) for $a = 0 to $Filled[0] -1 GUICtrlSetGraphic($Graphic,$GUI_GR_COLOR,$Particle[$Filled[$a+1]][9],$Particle[$Filled[$a+1]][9]) GUICtrlSetGraphic($Graphic,$GUI_GR_ELLIPSE,$Pre_Render[$a][0],$Pre_Render[$a][1],$Pre_Render[$a][2],$Pre_Render[$a][2]) Next #cs if $Redraw then for $a = 0 to UBound($axis,3) -1 $b = Calc_Render(($a-.5*UBound($axis,3))*$Dist_Max,0,0,0) $axis[0][0][$a] = $b[0] $axis[0][1][$a] = $b[1] $b = Calc_Render(0,($a-.5*UBound($axis,3))*$Dist_Max,0,0) $axis[1][0][$a] = $b[0] $axis[1][1][$a] = $b[1] $b = Calc_Render(0,0,Max(($a-.5*UBound($axis,3))*$Dist_Max,$pan[2]+.01),0) $axis[2][0][$a] = $b[0] $axis[2][1][$a] = $b[1] Next EndIf GUICtrlSetGraphic($Graphic,$GUI_GR_COLOR,0x222222) GUICtrlSetGraphic($Graphic,$GUI_GR_MOVE,$axis[0][0][0],$axis[0][1][0]) for $a = 1 to UBound($axis,3) -1 GUICtrlSetGraphic($Graphic,$GUI_GR_LINE,$axis[0][0][$a],$axis[0][1][$a]) Next GUICtrlSetGraphic($Graphic,$GUI_GR_MOVE,$axis[1][0][0],$axis[1][1][0]) for $a = 1 to UBound($axis,3) -1 GUICtrlSetGraphic($Graphic,$GUI_GR_LINE,$axis[1][0][$a],$axis[1][1][$a]) Next GUICtrlSetGraphic($Graphic,$GUI_GR_MOVE,$axis[2][0][0],$axis[2][1][0]) for $a = 1 to UBound($axis,3) -1 GUICtrlSetGraphic($Graphic,$GUI_GR_LINE,$axis[2][0][$a],$axis[2][1][$a]) Next #ce GUICtrlSetGraphic($Graphic,$GUI_GR_REFRESH) EndFunc Func Calc_Render($x,$y,$z,$r) Local $d local $return[3] $z = $z - $pan[2] if $z > 0 then $x = $x - $pan[0] $y = $y - $pan[1] $d = Sqrt($x^2+$y^2+$z^2) + .001 $r = Max((2 * $View * $r)/($d),1) $x = ($x*$View)/$d + .5 * $Window_Size[0] - .5 * $r $y = ($y*$View)/$d + .5 * $Window_Size[1] - .5 * $r Else $x = -100 $y = -100 EndIf $return[0] = $x $return[1] = $y $return[2] = $r Return $return EndFunc Func add_particle() Local $a = $empty[1],$b,$c,$d $Num_Particle_Current = $Num_Particle_Current + 1 if $atomic Then Else $Particle[$a][0] = -1 $b = Random(0,2*$pi) $Particle[$a][1] = cos($b) * $Dist_Start * Random(0,1) $Particle[$a][2] = Sin($b) * $Dist_Start * Random(0,1) $Particle[$a][3] = Sin($b) * $Dist_Start * (Random(0,1) * 2 - 1 ) $Particle[$a][4] = $Speed_Max * Random(-1,1) $Particle[$a][5] = $Speed_Max * Random(-1,1) $Particle[$a][6] = $Speed_Max * Random(-1,1) $Particle[$a][7] = Random($Size_Particle_Min,$Size_Particle_Max) $Particle[$a][8] = ((3/4) * $Particle[$a][7])^(1/3) Color_Shift($a) EndIf $Filled[0] = UBound($Filled) - 1 $empty[0] = $empty[0] - 1 _ArrayAdd($Filled,$a) _ArrayDelete($empty,1) EndFunc Func Color_Shift($a) ;$Particle[$a][9] = 0xffffff if $select[2] = 1 then $Particle[$a][9] = "0x" & hex(Max(255 - .09*$Particle[$a][7]*($Size_Particle_Max/$Size_Particle_Min),0),2) & hex(Max(255 - 1*$Particle[$a][7]*($Size_Particle_Max/$Size_Particle_Min) _ ,0),2) & hex(Max(255 - 2*$Particle[$a][7]*($Size_Particle_Max/$Size_Particle_Min),0),2) Else $Particle[$a][9] = randcolor() EndIf EndFunc Func restart() $restart = True EndFunc ;select Func select_inc() Local $a = $select[0] if $a < $dim_max_particles then $a += 1 Else $a = 1 EndIf While $Particle[$a][7] = 0 if $a < $dim_max_particles - 1 then $a += 1 Else $a = 0 EndIf WEnd $select[0] = $a EndFunc Func select_dec() Local $a = $select[0] if $a > 0 then $a -= 1 Else $a = $dim_max_particles -1 EndIf While $Particle[$a][7] = 0 if $a > 0 then $a -= 1 Else $a = $dim_max_particles -1 EndIf WEnd $select[0] = $a EndFunc Func select_mode() $select[1] = -$select[1] if $select[1] = 1 Then if $Particle[$select[0]][7] = 0 Then select_inc() $pan[3] = 0 $pan[4] = 0 $pan[5] = $pan[5] - $Particle[$select[0]][3] Else $pan[3] = $pan[0] $pan[4] = $pan[1] $pan[5] = $pan[5] + $Particle[$select[0]][3] EndIf EndFunc Func color_mode() $select[2] *= -1 for $a = 1 to UBound($Filled) - 1 Color_Shift($a) Next EndFunc ;Zoom func zoom_in() $pan[5] = $pan[5] + $pan_const $Redraw = True EndFunc func zoom_out() $Redraw = True $pan[5] = $pan[5] - $pan_const EndFunc Func left() $Redraw = True $pan[3]= $pan[3] - $pan_const EndFunc Func right() $Redraw = True $pan[3]= $pan[3] + $pan_const EndFunc Func up() $Redraw = True $pan[4]= $pan[4] - $pan_const EndFunc Func down() $Redraw = True $pan[4]= $pan[4] + $pan_const EndFunc ;Defaults Func randcolor() local $number = "0x", $a For $a = 1 to 3 $number = $number & String(Hex(Random(40,255,1),2)) Next Return $number EndFunc func enter() $enter = True EndFunc Func test_box() MsgBox(0,0,0) EndFunc Func Max($a,$b) if $a > $b then Return $a Return $b EndFunc Func Min($a,$b) if $a < $b then Return $a Return $b EndFunc
31.364629
185
0.625409
efdeef1e12abb8744a4fd8ee5a4f70be1d563ada
9,548
au3
AutoIt
incl/GWA2_Function_Header_Table.au3
rheek123/GwBotApiPatcher
654efbcbf45f02689cdc71d67bc24caa774f7bcf
[ "Unlicense" ]
5
2018-04-14T22:14:22.000Z
2020-02-13T09:11:08.000Z
incl/GWA2_Function_Header_Table.au3
rheek123/GwBotApiPatcher
654efbcbf45f02689cdc71d67bc24caa774f7bcf
[ "Unlicense" ]
1
2020-02-13T09:11:28.000Z
2020-02-13T09:11:28.000Z
incl/GWA2_Function_Header_Table.au3
rheek123/GwBotApiPatcher
654efbcbf45f02689cdc71d67bc24caa774f7bcf
[ "Unlicense" ]
3
2021-03-16T08:46:11.000Z
2021-09-10T12:56:15.000Z
; The patcher tries to find calls to sendpacket inside functions. ; It matches the function name against the function names in the list below. ; If it matches, it replaces the whatever stored as the header parameter by the third element in the list below. ; The second parameter is used to distinguish between multiple calls inside the same function. ; If it is '0', all calls to sendpacket inside this function are set to the same variable ; If it is !='0', it will set the first/second/... (depending on the stored value) call to sendpacket to the variable specified. ; ; Example: ; In SetDisplayedTitle there are two different headers used. First $HEADER_TITLE_DISPLAY, then $HEADER_TITLE_CLEAR. ; This is reflected by the occurance: ; ; ["SetDisplayedTitle", 1, "$HEADER_TITLE_DISPLAY"], _ ;first sendpacket inside SetDisplayedTitle needs $HEADER_TITLE_DISPLAY ; ["SetDisplayedTitle", 2, "$HEADER_TITLE_CLEAR"], _ ;second sendpacket inside SetDisplayedTitle needs $HEADER_TITLE_CLEAR ; ; Another one: ; Some versions of UseItem have one call to sendpacket, the gwapi version has three calls. They all use the same header, so you can set the occurance to 0 ; This way the same variable is going to be used for each call inside UseItem. ; ; ["UseItem", 0, "$HEADER_ITEM_USE"], _ ;Uses item from inventory/chest ; ; ; Global $gwa2func_fname = 0 ;first entry of list, the function name Global $gwa2func_occurance = 1 ;second entry of list, the n-th call to sendpacket inside the function (0 for no difference of headers inside function) Global $gwa2func_variable = 2 ;third entry of list, the variable name Global $gwa2func_headers[][3] = [ _ ["AbandonQuest", 0, "$HEADER_QUEST_ABANDON"], _ ;Abandons the quest ["SetHeroAggression", 0, "$HEADER_HERO_AGGRESSION"], _ ;Sets the heroes aggression level ["LockHeroTarget", 0, "$HEADER_HERO_LOCK"], _ ;Locks the heroes target ["ChangeHeroSkillSlotState", 0, "$HEADER_HERO_TOGGLE_SKILL"], _ ;Enables or disables the heroes skill ["CancelHero", 0, "$HEADER_HERO_CLEAR_FLAG"], _ ;Clears the heroes position flag ["CommandHero", 0, "$HEADER_HERO_PLACE_FLAG"], _ ;Sets the heroes position flag, hero runs to position ["CommandHero1", 0, "$HEADER_HERO_PLACE_FLAG"], _ ;Sets the heroes position flag, hero runs to position ["CommandHero2", 0, "$HEADER_HERO_PLACE_FLAG"], _ ;Sets the heroes position flag, hero runs to position ["CommandHero3", 0, "$HEADER_HERO_PLACE_FLAG"], _ ;Sets the heroes position flag, hero runs to position ["CommandHero4", 0, "$HEADER_HERO_PLACE_FLAG"], _ ;Sets the heroes position flag, hero runs to position ["CommandHero5", 0, "$HEADER_HERO_PLACE_FLAG"], _ ;Sets the heroes position flag, hero runs to position ["CommandHero6", 0, "$HEADER_HERO_PLACE_FLAG"], _ ;Sets the heroes position flag, hero runs to position ["CommandHero7", 0, "$HEADER_HERO_PLACE_FLAG"], _ ;Sets the heroes position flag, hero runs to position ["CommandAll", 0, "$HEADER_PARTY_PLACE_FLAG"], _ ;Sets the party position flag, all party-npcs runs to position ["CancelAll", 0, "$HEADER_PARTY_CLEAR_FLAG"], _ ;Clears the party position flag ["AddHero", 0, "$HEADER_HERO_ADD"], _ ;Adds hero to party ["KickHero", 0, "$HEADER_HERO_KICK"], _ ;Kicks hero from party ["KickAllHeroes", 0, "$HEADER_HEROES_KICK"], _ ;Kicks ALL heroes from party ["CallTarget", 0, "$HEADER_CALL_TARGET"], _ ;Calls the target without attacking (Ctrl+Shift+Space) ["Attack", 0, "$HEADER_ATTACK_AGENT"], _ ;Attacks agent ["CallAttack", 0, "$HEADER_ATTACK_AGENT"], _ ;Calls and Attacks agent ["CancelAction", 0, "$HEADER_CANCEL_ACTION"], _ ;Cancels the current action ["DropBuff", 0, "$HEADER_STOP_MAINTAIN_ENCH"], _ ;Drops buff, cancel enchantmant, whatever you call it ["DropAllBonds", 0, "$HEADER_STOP_MAINTAIN_ENCH"], _ ;Drops buff, cancel enchantmant, whatever you call it ["DropAllBuffs", 0, "$HEADER_STOP_MAINTAIN_ENCH"], _ ;Drops buff, cancel enchantmant, whatever you call it ["DropItem", 0, "$HEADER_ITEM_DROP"], _ ;Drops item from inventory to ground ["DropGold", 0, "$HEADER_GOLD_DROP"], _ ;Drops gold from inventory to ground ["EquipItem", 0, "$HEADER_ITEM_EQUIP"], _ ;Equips item from inventory/chest/no idea ["GoPlayer", 0, "$HEADER_AGENT_FOLLOW"], _ ;Follows the agent/npc. Ctrl+Click triggers "I am following Person" in chat ["DonateFaction", 0, "$HEADER_FACTION_DONATE"], _ ;Donates kurzick/luxon faction to ally ["GoNPC", 0, "$HEADER_NPC_TALK"], _ ;talks/goes to npc ["AcceptQuest", 0, "$HEADER_QUEST_ACCEPT"], _ ;Accepts a quest from the NPC ["QuestReward", 0, "$HEADER_QUEST_REWARD"], _ ;Retrieves Quest reward from NPC ["Dialog", 0, "$HEADER_DIALOG"], _ ;Sends a dialog to NPC ["PickUpItem", 0, "$HEADER_ITEM_PICKUP"], _ ;Picks up an item from ground ["PickUpItem_", 0, "$HEADER_ITEM_PICKUP"], _ ;Picks up an item from ground ["ChangeSecondProfession", 0, "$HEADER_CHANGE_SECONDARY"], _ ;Changes Secondary class (from Build window, not class changer) ["GoSignpost", 0, "$HEADER_SIGNPOST_RUN"], _ ;Goes to signpost ["OpenChest", 0, "$HEADER_CHEST_OPEN"], _ ;Opens a chest (with key AFAIK) ["SetDisplayedTitle", 1, "$HEADER_TITLE_DISPLAY"], _ ;Displays title (from Gigis Vaettir Bot) ["SetDisplayedTitle", 2, "$HEADER_TITLE_CLEAR"], _ ;Hides title (from Gigis Vaettir Bot) ["AsuranRank", 0, "$HEADER_TITLE_DISPLAY"], _ ;Displays the asura title ["NornRank", 0, "$HEADER_TITLE_DISPLAY"], _ ;Displays the norn title ["VanguardRank", 0, "$HEADER_TITLE_DISPLAY"], _ ;Displays the vanguard title ["SetSkillbarSkill", 0, "$HEADER_SKILL_CHANGE"], _ ;Changes a skill on the skillbar ["ReplaceSkill", 0, "$HEADER_SKILL_CHANGE"], _ ;Changes a skill on the skillbar ["LoadSkillBar", 0, "$HEADER_BUILD_LOAD"], _ ;Loads a complete build ["SkipCinematic", 0, "$HEADER_CINEMATIC_SKIP"], _ ;Skips the cinematic ["needed for sendchat", 0, "$HEADER_SEND_CHAT"], _ ;Needed for sending messages in chat ["DestroyItem", 0, "$HEADER_ITEM_DESTROY"], _ ;Destroys item in inventory ["IdentifyItem", 0, "$HEADER_ITEM_ID"], _ ;Identifies item in inventory ["IdentifyItemExplorable", 0, "$HEADER_ITEM_ID"], _ ["MoveItem", 0, "$HEADER_ITEM_MOVE"], _ ;Moves item in inventory ["AcceptAllItems", 0, "$HEADER_ITEMS_ACCEPT_UNCLAIMED"], _ ;Accepts items not picked up in missions ["SalvageMaterials", 0, "$HEADER_SALVAGE_MATS"], _ ;Salvages materials from item ["SalvageMod", 0, "$HEADER_SALVAGE_MODS"], _ ;Salvages mods from item ["ChangeGold", 0, "$HEADER_GOLD_MOVE"], _ ;Moves Gold (from chest to inventory, and otherway around IIRC) ["UseItem", 0, "$HEADER_ITEM_USE"], _ ;Uses item from inventory/chest ["UseItemBySlot", 0, "$HEADER_ITEM_USE"], _ ;Uses item from inventory/chest ["UseItembyModelID", 0, "$HEADER_ITEM_USE"], _ ;Uses item from inventory/chest ["SwitchMode", 0, "$HEADER_MODE_SWITCH"], _ ;Toggles hard- and normal mode ["AddNpc", 0, "$HEADER_HENCHMAN_ADD"], _ ;Adds henchman to party ["LeaveGroup", 0, "$HEADER_PARTY_LEAVE"], _ ;Leaves the party ["EnterChallenge", 0, "$HEADER_MISSION_ENTER"], _ ;Enter a mission/challenge ["EnterChallengeForeign", 0, "$HEADER_MISSION_FOREIGN_ENTER"], _ ;Enters a foreign mission/challenge (no idea honestly) ["ReturnToOutpost", 0, "$HEADER_OUTPOST_RETURN"], _ ;Returns to outpost after /resign ["KickNpc", 0, "$HEADER_HENCHMAN_KICK"], _ ;Kicks a henchman from party ["TravelGH", 0, "$HEADER_GUILDHALL_TRAVEL"], _ ;Travels to guild hall ["MoveMap", 0, "$HEADER_MAP_TRAVEL"], _ ;Travels to outpost via worldmap ["Travel", 0, "$HEADER_MAP_TRAVEL"], _ ;Travels to outpost via worldmap ["LeaveGH", 0, "$HEADER_GUILDHALL_LEAVE"], _ ;Leaves Guildhall ["UseSkillBySkillID", 1, "$HEADER_SKILL_USE_ALLY"], _ ["UseSkillBySkillID", 2, "$HEADER_SKILL_USE_FOE"], _ ["UseSkillByID", 0, "$HEADER_SKILL_USE_ID"], _ ["InviteTarget", 0, "$HEADER_INVITE_TARGET"], _ ["InvitePlayerByID", 0, "$HEADER_INVITE_TARGET"], _ ["InvitePlayerByPlayerNumber", 0, "$HEADER_INVITE_TARGET"], _ ["AcceptInvite", 0, "$HEADER_INVITE_ACCEPT"], _ ["SubmitOffer", 0, "$HEADER_TRADE_SUBMIT_OFFER"], _ ["ChangeOffer", 0, "$HEADER_TRADE_CHANGE_OFFER"], _ ["CancelTrade", 0, "$HEADER_TRADE_CANCEL"], _ ["AcceptTrade", 0, "$HEADER_TRADE_ACCEPT"], _ ["OfferItem", 0, "$HEADER_TRADE_OFFER_ITEM"], _ ["TradePlayer", 0, "$HEADER_TRADE_PLAYER"], _ ["MoveItemEx", 0, "$HEADER_ITEM_MOVE_EX"], _ ["UnequipItem", 0, "$HEADER_ITEM_UNEQUIP"], _ ["Upgrade", 0, "$HEADER_UPGRADE"], _ ["UpgradeArmor", 1, "$HEADER_UPGRADE_1"], _ ["UpgradeArmor", 2, "$HEADER_UPGRADE_2"], _ ["", 0, ""]]
78.909091
155
0.652283
23a49edd6d8b2b220f9d57d3955d096ee41a9496
3,082
au3
AutoIt
Attachments/36K-37K/6000-7000/36378/Image Printer Sample.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
3
2021-01-19T19:13:50.000Z
2021-06-20T15:29:16.000Z
Attachments/36K-37K/6000-7000/36378/Image Printer Sample.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
Attachments/36K-37K/6000-7000/36378/Image Printer Sample.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
#include <file.au3> #include <array.au3> Dim $PS, $szDrive, $szDir, $szFName, $szExt Const $File = FileOpen(@ScriptDir & "\Barcode.ps", 2) $PS = "" $Input = "AutoIT is Great !!" ; Check if file opened for writing OK If $File = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf $PS = '%!PS-Adobe-2.0' $PS = $PS & @CRLF & '% --BEGIN TEMPLATE--' $PS = $PS & @CRLF $PS = $PS & @CRLF & '% --EXOP: includetext guardwhitespace' $PS = $PS & @CRLF $PS = $PS & @CRLF & '%!' $PS = $PS & @CRLF & '% --BEGIN SAMPLE--' $PS = $PS & @CRLF $PS = $PS & @CRLF & '% We call the procedures like this:' $PS = $PS & @CRLF & '/Helvetica findfont 10 scalefont setfont' $PS = $PS & @CRLF $PS = $PS & @CRLF & '% Add Rotated Text' $PS = $PS & @CRLF $PS = $PS & @CRLF & '/Times-Roman findfont' $PS = $PS & @CRLF & '32 scalefont' $PS = $PS & @CRLF & 'setfont' $PS = $PS & @CRLF $PS = $PS & @CRLF & '100 200 translate' $PS = $PS & @CRLF & '45 rotate' $PS = $PS & @CRLF & '2 1 scale' $PS = $PS & @CRLF & 'newpath' $PS = $PS & @CRLF & '0 0 moveto' $PS = $PS & @CRLF & '(' & $Input & ') true charpath' $PS = $PS & @CRLF & '0.5 setlinewidth' $PS = $PS & @CRLF & '0.4 setgray' $PS = $PS & @CRLF & 'stroke' $PS = $PS & @CRLF $PS = $PS & @CRLF & '/inch {72 mul} def % Convert inches->points (1/72 inch)' $PS = $PS & @CRLF & '/Helvetica findfont 40 scalefont setfont %use 40 pt Helvetica font' $PS = $PS & @CRLF & 'newpath % Start a new path' $PS = $PS & @CRLF & '1 inch 1 inch moveto % an inch in from the lower left' $PS = $PS & @CRLF & '2 inch 1 inch lineto % bottom side' $PS = $PS & @CRLF & '2 inch 2 inch lineto % right side' $PS = $PS & @CRLF & '1 inch 2 inch lineto % top side' $PS = $PS & @CRLF & '20 setlinewidth % fat line 20 pts wide' $PS = $PS & @CRLF & 'closepath % Automatically add left side to close path' $PS = $PS & @CRLF & 'stroke % nothing is drawn until you stroke the path!' $PS = $PS & @CRLF & '1.5 inch 2 inch moveto %move to new point to start new object' $PS = $PS & @CRLF & '1 inch .1 inch rlineto % bottom side using relative movement' $PS = $PS & @CRLF & '-.1 inch 1 inch rlineto % right side "' $PS = $PS & @CRLF & '-1 inch -.1 inch rlineto % top side "' $PS = $PS & @CRLF & 'closepath % Automatically add left side to close path' $PS = $PS & @CRLF & 'gsave % Save the above path, for later reuse' $PS = $PS & @CRLF & '.5 .2 0 setrgbcolor % change the color to brown' $PS = $PS & @CRLF & 'fill % Fill in the box ' $PS = $PS & @CRLF & 'grestore % restore the previous path, to reuse it' $PS = $PS & @CRLF & '0 0 1 setrgbcolor %blue' $PS = $PS & @CRLF & '10 setlinewidth % 10 pts wide' $PS = $PS & @CRLF & 'stroke %draw the perimeter of the box' $PS = $PS & @CRLF & '1 inch 1 inch moveto' $PS = $PS & @CRLF & '52 rotate' $PS = $PS & @CRLF & '1 0 0 setrgbcolor %red' $PS = $PS & @CRLF & '(But is it art?) show' $PS = $PS & @CRLF $PS = $PS & @CRLF & 'showpage' $PS = $PS & @CRLF $PS = $PS & @CRLF & '% --END SAMPLE--' FileWriteLine($File, $PS) FileClose($File) ShellExecuteWait("prfile32.exe","Barcode.ps","") FileDelete(@scriptdir & "\Barcode.ps")
38.525
88
0.584361
63535639492b1aadce080e516cce94b73df08308
211
au3
AutoIt
autoit/install/Examples/Helpfile/BitNOT.au3
andyseubert/doorbell
ab65d44aa36fcad407275e33d8aa3140d17d3c35
[ "Unlicense" ]
null
null
null
autoit/install/Examples/Helpfile/BitNOT.au3
andyseubert/doorbell
ab65d44aa36fcad407275e33d8aa3140d17d3c35
[ "Unlicense" ]
null
null
null
autoit/install/Examples/Helpfile/BitNOT.au3
andyseubert/doorbell
ab65d44aa36fcad407275e33d8aa3140d17d3c35
[ "Unlicense" ]
null
null
null
Local $x = BitNOT(5) #cs Comments: Result is -6 because for 32-bit numbers 5 == 00000000000000000000000000000101 binary -6 == 11111111111111111111111111111010 binary and the first bit is signed #ce
23.444444
47
0.739336
de810e5eef4b6cc3031cae862baa8b39259dd326
2,578
au3
AutoIt
Attachments/1-10K/6000-7000/6712/BF.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
3
2021-01-19T19:13:50.000Z
2021-06-20T15:29:16.000Z
Attachments/1-10K/6000-7000/6712/BF.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
Attachments/1-10K/6000-7000/6712/BF.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
#include <_XInput.au3> $dll = DllOpen("user32.dll") $inputhwnd = _XInputInit() $fire1=0 $fire2=0 $forward = 0 $left = 0 $right = 0 $back = 0 $crouch = 0 $sensitivity = 4500 ;Higher Value equals less sensitive While 1 $input = _XInputGetInput($inputhwnd) $buttons = _XInputButtons($input[2]) _XInputVibrate($inputhwnd, round(($input[4] / 255) * 100),round(($input[3] / 255) * 100)) If $buttons[14] Then Send("e") If $buttons[10] Then MouseWheel("up") If $buttons[9] Then MouseWheel("down") If $buttons[11] Then Send("{SPACE}") If $buttons[12] Then Send("r") If $buttons[7] Then If $toggle = 1 Then If $crouch = 1 Then Send("{CTRLUP}") $crouch = 0 Else Send("{CTRLDOWN}") $crouch = 1 EndIf $toggle = 0 EndIf Else $toggle = 1 EndIf If $buttons[2] Then Send("z") If $input[4]<200 Then If $fire1=1 Then MouseUp("left") $fire1=0 EndIf Else If $fire1=0 then MouseDown ( "left" ) $fire1=1 EndIf EndIf If $input[3]<200 Then If $fire2=1 Then MouseUp("right") $fire2=0 EndIf Else If $fire2=0 then MouseDown ( "right" ) $fire2=1 EndIf EndIf If $input[6]<22000 Then If $forward = 1 then Send("{w up}") $forward=0 EndIf Else If $forward = 0 then Send("{w down}") $forward=1 EndIf EndIf If $input[6]>-22000 Then If $back = 1 then Send("{s up}") $back=0 EndIf Else If $back = 0 then Send("{s down}") $back=1 EndIf EndIf If $input[5]<22000 Then If $left = 1 then Send("{d up}") $left=0 EndIf Else If $left = 0 then Send("{d down}") $left=1 EndIf EndIf If $input[5]>-22000 Then If $right = 1 then Send("{a up}") $right=0 EndIf Else If $right = 0 then Send("{a down}") $right=1 EndIf EndIf If abs($input[7]) > 4000 Or abs($input[8])>4000 Then _MouseMovePlus((($buttons[8]*2)+1)*($input[7]/$sensitivity),-(($buttons[8]*2)+1)*($input[8]/$sensitivity),$dll) _MySleep(5) WEnd Func _MySleep($t) DllCall("winmm.dll","long","timeBeginPeriod","long",1) DllCall("kernel32.dll", "none", "Sleep", "long", $t) DllCall("winmm.dll","long","timeEndPeriod","long",1) EndFunc Func _MouseMovePlus($X = "", $Y = "",$dll = 0) Local $MOUSEEVENTF_MOVE = 0x1 If $dll = 0 Then DllCall("user32.dll", "none", "mouse_event", _ "long", $MOUSEEVENTF_MOVE, _ "long", $X, _ "long", $Y, _ "long", 0, _ "long", 0) Else DllCall($dll, "none", "mouse_event", _ "long", $MOUSEEVENTF_MOVE, _ "long", $X, _ "long", $Y, _ "long", 0, _ "long", 0) EndIf EndFunc
18.817518
164
0.59038
a0cafaa48017aacfa28b0bb1be72aba42f1ad3ae
1,920
au3
AutoIt
Attachments/1-10K/6000-7000/6717/treeview.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
3
2021-01-19T19:13:50.000Z
2021-06-20T15:29:16.000Z
Attachments/1-10K/6000-7000/6717/treeview.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
Attachments/1-10K/6000-7000/6717/treeview.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
Func _IniGetSectionNames( $file, $TreeView ) Local $varx = IniReadSectionNames( $file ) If @error Then MsgBox(4096, "", "Error occured, probably no INI file.") Else For $i_SectionIndex = 1 To $varx[0] ;MsgBox(4096, "", $varx[$i_SectionIndex]) _IniReadInfo( $file, $varx, $TreeView, $i_SectionIndex ) Next EndIf EndFunc Func _IniReadInfo( $file, $varx, $TreeView, $i_SectionIndex ) Local $var = IniReadSection($file,$varx[$i_SectionIndex]) ;MsgBox(32,"VarX","Varx = " & $varx[$i_SectionIndex]) If @error Then MsgBox(4096, "", "Error occured, probably no INI file.") Else Local $TreeView2 = GUICtrlCreateTreeViewitem($varx[$i_SectionIndex],$TreeView ) For $i = 1 To $var[0][0] GUICtrlCreateTreeViewItem($var[$i][0], $TreeView2) ;MsgBox(4096, "", "Key: " & $var[$i][0] & @CRLF );& "Value: " & $var[$i][1]) Next EndIf EndFunc Func _CreateGUI() If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("Antitux-Installer", 955, 620,(@DesktopWidth-955)/2, (@DesktopHeight-620)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) Global $Edit_1 = GuiCtrlCreateEdit("Edit", 320, 10, 300, 600) Global $Pic_1 = GuiCtrlCreatePic("Screen1", 630, 100, 320, 240) Global $Pic_2 = GuiCtrlCreatePic("Screen2", 630, 370, 320, 240) Global $Button_install = GuiCtrlCreateButton("Installieren", 650, 20, 80, 30) Global $Button_repair = GuiCtrlCreateButton("Reparieren", 750, 20, 80, 30) Global $Button_uninstall = GuiCtrlCreateButton("Deinstallieren", 850, 20, 80, 30) Global $Label_1 = GuiCtrlCreateLabel("Screenshot n.v.", 630, 70, 320, 30) Global $Label_2 = GuiCtrlCreateLabel("Screenshot n.v.", 630, 350, 320, 20) Global $Group_Action = GuiCtrlCreateGroup("Aktion", 630, 0, 320, 60) Return GuiCtrlCreateTreeview(10, 10, 300, 600) EndFunc
45.714286
145
0.666667
9d1ff95e97d2216de08d9d09f898bfd944277470
8,104
au3
AutoIt
ags-component-http-request.au3
autoit-gui-skeleton/ags-component-http-request
c7518cf0f9539ca1b9554174748a7f10d3446aa0
[ "MIT" ]
null
null
null
ags-component-http-request.au3
autoit-gui-skeleton/ags-component-http-request
c7518cf0f9539ca1b9554174748a7f10d3446aa0
[ "MIT" ]
null
null
null
ags-component-http-request.au3
autoit-gui-skeleton/ags-component-http-request
c7518cf0f9539ca1b9554174748a7f10d3446aa0
[ "MIT" ]
null
null
null
#cs -------------------------------------------------------------------------------------------------------- HttpRequest Service helper to send HTTP requests GET or POST, with the Winhttprequest.5.1 COM object. More information here : https://beamtic.com/http-requests-autoit Component title : HttpRequest Component version : 1.0.0 AutoIt version : 3.3.14.5 Author : v20100v <7567933+v20100v@users.noreply.github.com> Package : AGS version 1.0.0 #ce -------------------------------------------------------------------------------------------------------- #include-once Opt('MustDeclareVars', 1) ;=========================================================================================================== ; Send HTTP request with GET method ; ; @param $url (string) : URL want to open ; @param $data (string) : Data to be posted by GET method (?param1=23&param2=ibicf) ; @param $proxy (string) : Specify a proxy. By default we load proxy settings form configuration file ; @return $oHttp (object) : Instance of the Winhttprequest.5.1 object ; ; @example ; <code> ; Local $response = HttpGET("http://www.google.com/", default, "http://myproxy.com:20100") ; ConsoleWrite($response.Status & @CRLF) ; ConsoleWrite($response.ResponseText) ; </code> ;=========================================================================================================== Func HttpGET($url, $data = "", $proxy = "") Local $oHttp = ObjCreate("WinHttp.WinHttpRequest.5.1") ; Configure timeouts on $oHttp instance $oHttp = WinHttp_SetTimeouts_from_configuration_file($oHttp) ; Configure proxy on $oHttp instance $oHttp = WinHttp_SetProxy_from_configuration_file($oHttp) ; If we have $proxy arguments in this method it overrides proxy settings from configuration file If ($proxy <> "") Then $oHttp.SetProxy(2, $proxy) EndIf ; Prepare url to send If ($data <> "") Then $url = $url & "?" & $data EndIf $oHttp.Open("GET", $url, False) If (@error) Then Return SetError(1, 0, 0) $oHttp.Send() If (@error) Then Return SetError(2, 0, 0) If ($oHttp.Status <> 200) Then Return SetError(3, $oHttp.Status, $oHttp.ResponseText) EndIf Return SetError(0, 0, $oHttp) EndFunc ;=========================================================================================================== ; Send HTTP request with POST method ; ; @param $url (string) : URL want to open ; @param $data (string) : Data to be posted by POST method ; @param $proxy (string) : Specify a proxy. By default we load proxy settings form configuration file ; @return $oHttp (object) : Instance of the Winhttprequest.5.1 object ;=========================================================================================================== Func HttpPOST($url, $data = "", $proxy = "") Local $oHttp = ObjCreate("WinHttp.WinHttpRequest.5.1") ; Configure timeouts on $oHttp instance $oHttp = WinHttp_SetTimeouts_from_configuration_file($oHttp) ; Configure proxy on $oHttp instance $oHttp = WinHttp_SetProxy_from_configuration_file($oHttp) ; If we pass $proxy arguments in this method it overrides proxy settings from configuration file If ($proxy <> "") Then $oHttp.SetProxy(2, $proxy) EndIf $oHttp.Open("POST", $url, False) If (@error) Then Return SetError(1, 0, 0) $oHttp.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHttp.Send($data) If (@error) Then Return SetError(2, 0, 0) If ($oHttp.Status <> 200) Then Return SetError(3, $oHttp.Status, $oHttp.ResponseText) EndIf Return SetError(0, 0, $oHttp) EndFunc ;=========================================================================================================== ; URL encode ; ; @param $urlText (string) ; @return $urlEncoded (string) ; ; @example ; <code> ; ConsoleWrite(URLEncode("123abc!@#$%^&*()_+ ") & @crlf) ; ConsoleWrite(URLEncode("mére & père !!!") & @crlf) ; </code> ;=========================================================================================================== Func URLEncode($urlText) Local $urlEncoded = "" Local $acode For $i = 1 To StringLen($urlText) $acode = Asc(StringMid($urlText, $i, 1)) Select Case ($acode >= 48 And $acode <= 57) Or _ ($acode >= 65 And $acode <= 90) Or _ ($acode >= 97 And $acode <= 122) $urlEncoded = $urlEncoded & StringMid($urlText, $i, 1) Case $acode = 32 $urlEncoded = $urlEncoded & "+" Case Else $urlEncoded = $urlEncoded & "%" & Hex($acode, 2) EndSelect Next Return $urlEncoded EndFunc ;=========================================================================================================== ; URL decode ; ; @param $urlText (string) ; @return $urlDecoded (string) ;=========================================================================================================== Func URLDecode($urlText) $urlText = StringReplace($urlText, "+", " ") Local $matches = StringRegExp($urlText, "\%([abcdefABCDEF0-9]{2})", 3) If Not @error Then For $match In $matches $urlText = StringReplace($urlText, "%" & $match, BinaryToString('0x' & $match)) Next EndIf Return $urlText EndFunc ;=========================================================================================================== ; SetTimeouts by parsing the configuration file './config/myApplication.ini' ; ; @param $oHttp (object) : Instance of the Winhttprequest.5.1 object ; @return $oHttp (object) : Instance of the Winhttprequest.5.1 object ; ; $RESOLVE_TIMEOUT (int) : Time-out value applied when resolving a host name to an IP address (such as ; www.microsoft.com to 192.168.131.199), in milliseconds. The default value ; is zero, meaning no time-out (infinite). ; $CONNECT_TIMEOUT (int) : Time-out value applied when establishing a communication socket with the ; target server, in milliseconds. The default value is 60 seconds. ; $SEND_TIMEOUT (int) : Time-out value applied when sending an individual packet of request data on ; the communication socket to the target server, in milliseconds. A large ; request sent to an HTTP server are normally be broken up into multiple ; packets; the send time-out applies to sending each packet individually. ; The default value is 30,000 (30 seconds). ; $RECEIVE_TIMEOUT (int) : Time-out value applied when receiving a packet of response data from the ; target server, in milliseconds. Large responses are be broken up into ; multiple packets; the receive time-out applies to fetching each packet ; of data off the socket. The default value is 30,000 (30 seconds). ;=========================================================================================================== Func WinHttp_SetTimeouts_from_configuration_file($oHttp) Local $RESOLVE_TIMEOUT = Int(IniRead($APP_PARAMETERS_INI, "AGS_HTTP_REQUEST", "RESOLVE_TIMEOUT", 0)) Local $CONNECT_TIMEOUT = Int(IniRead($APP_PARAMETERS_INI, "AGS_HTTP_REQUEST", "CONNECT_TIMEOUT", 60000)) Local $SEND_TIMEOUT = Int(IniRead($APP_PARAMETERS_INI, "AGS_HTTP_REQUEST", "SEND_TIMEOUT", 30000)) Local $RECEIVE_TIMEOUT = Int(IniRead($APP_PARAMETERS_INI, "AGS_HTTP_REQUEST", "RECEIVE_TIMEOUT", 30000)) $oHttp.SetTimeouts($RESOLVE_TIMEOUT, $CONNECT_TIMEOUT, $SEND_TIMEOUT, $RECEIVE_TIMEOUT) Return $oHttp EndFunc ;=========================================================================================================== ; Set proxy by parsing the configuration file './config/myApplication.ini' ; ; @param $oHttp (object) : Instance of the Winhttprequest.5.1 object ; @return $oHttp (object) : Instance of the Winhttprequest.5.1 object ;=========================================================================================================== Func WinHttp_SetProxy_from_configuration_file($oHttp) Local $proxy = IniRead($APP_PARAMETERS_INI, "AGS_HTTP_REQUEST", "PROXY", "") If ($proxy <> "") Then $oHttp.SetProxy(2, $proxy) EndIf Return $oHttp EndFunc
39.531707
108
0.559477
fae4b7261940a12afd1cfb2ac888beac76743841
6,562
au3
AutoIt
Attachments/16K-17K/6000-7000/16092/autoInstall.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
3
2021-01-19T19:13:50.000Z
2021-06-20T15:29:16.000Z
Attachments/16K-17K/6000-7000/16092/autoInstall.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
Attachments/16K-17K/6000-7000/16092/autoInstall.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
#NoTrayIcon ; Identify Installer modification for auto installation method of use #region - Include files #include <file.au3> #endregion #region - CMDLINE paramters If Not $CMDLINE[0] Then MsgBox(0x40000, 'Usage Help', 'Pass a path to an installer by CLI or use drag and drap', 5) ;InetGet("URL", "filename"); Hint: AutoIt function for downloading files :) Exit EndIf Global Const $FILE_FULLPATH = $CMDLINE[1] Global Const $FILE_NAME = StringTrimLeft($FILE_FULLPATH, StringInStr($FILE_FULLPATH, '\', 0, -1)) Global Const $FILE_TEXT = StringMid($FILE_NAME, 1, StringInStr($FILE_NAME, '.', 0, -1) -1) Global Const $FILE_EXT = StringMid($FILE_NAME, StringInStr($FILE_NAME, '.', 0, -1)) Global Const $FILE_WORKINGDIR = _File_WorkingDir($FILE_FULLPATH) FileChangeDir($FILE_WORKINGDIR) #endregion #region - Script actions _NoMultiFiles() _FileType($FILE_FULLPATH, 'exe|msi') ; ; Use True as 2nd parameter to test only ; 2nd parameter is optional and is False if not specified ; 3rd parameter is optional and 5000 ms default for splash window timeout _IdentifyInstaller(@ScriptDir & '\ErrorLog.log', True) #endregion Exit Func _IdentifyInstaller($logpath, $test = False, $time = 5000) Opt('MustDeclareVars', True) Local $output, $parameters, $window_on_top_attrib, $exitcode, $splashtext Local Const $TITLE_PEID = 'PEiD' Opt('WinWaitDelay', 50) ; Hide the PEiD window a bit better by getting rid of its on-top attribute $window_on_top_attrib = RegRead('HKCU\Software\PEiD', 'StayOnTop') RegWrite('HKCU\Software\PEiD', 'StayOnTop', 'REG_DWORD', 0) ; Run PeID to scan file. If Not FileExists(@ScriptDir & '\Files\PEiD.exe') Then DirCreate('files') _FileWriteLog($logpath, '"' & @ScriptDir & '\Files\PEID.exe" was not found') Exit 1 EndIf Run('"' & @ScriptDir & '\Files\PEiD.exe" -hard "' & $FILE_FULLPATH & '"') If WinWait($TITLE_PEID, '', 10) Then Sleep(1000) $output = ControlGetText($TITLE_PEID, '', 'Edit2') While $output = 'Scanning...' Or $output = '' Sleep(200) $output = ControlGetText($TITLE_PEID, '', 'Edit2') WEnd WinClose($TITLE_PEID) EndIf ; Identify the Installer Type Local Const $INSTALLER = '"' & $FILE_FULLPATH & '"' If StringInStr($output, 'Inno Setup') _ Or StringInStr($output, 'Inno SFX') _ Or StringInStr($output, 'Borland Delphi') Then ; Identified as Inno Setup $parameters = ' /SP- /SILENT' ElseIf StringInStr($output, 'Wise') Then ; Identified as Wise $parameters = ' /S' ElseIf StringInStr($output, 'Nullsoft') Then ; Identified as Nullsoft $parameters = ' /S' ElseIf StringInStr($output, 'InstallShield AFW') Then ; Identified as InstallShield AFW $parameters = ' /S /A /S /SMS' ElseIf StringInStr($output, 'InstallShield 2003') Then ; Identified as InstallShield 2003 $parameters = ' /V"/QN"' ElseIf StringInStr($output, 'RAR SFX') Then ; Identified as RAR SFX $parameters = ' /S' ElseIf StringInStr($output, 'ZIP SFX') Then ; Identified as ZIP SFX $parameters = ' /AUTOINSTALL' ElseIf StringInStr($output, 'WinZip') Then ; Identified as WinZip $parameters = ' /AUTOINSTALL' ElseIf StringRight($FILE_FULLPATH, 4) = '.msi' Then Opt('WinWaitDelay', 100) Run('msiexec /?') If WinWait('Windows Installer', 20) Then $content = ControlGetText('Windows Installer', '', 'RichEdit20W1') If $content = '' Then ; Using Vista $content = ControlGetText('Windows Installer', '', 'Edit1') EndIf WinClose('Windows Installer') Opt('WinWaitDelay', 250) If $content Then ; Identified as Windows Installer $parameters = ' /QN' EndIf EndIf EndIf If $parameters Then If $test Then ; Test Only $splashtext = 'Command selected for use:' & @CRLF & @CRLF & '"' & $FILE_FULLPATH & '" ' & $parameters SplashTextOn('Identify Installer', $splashtext, 800, 100, Default, 50, 32) Sleep($time) SplashOff() $exitcode = Random(0, 3, 1) If $exitcode Then _ScriptLog($exitcode, $FILE_FULLPATH, $parameters) EndIf Else ; Execute the installation and log non 0 exitcodes $exitcode = RunWait('"' & $FILE_FULLPATH & '" ' & $parameters) If $exitcode Then _ScriptLog($exitcode, $FILE_FULLPATH, $parameters) EndIf EndIf ElseIf $test Then ; Test Only $parameters = 'Failed to Identify' $splashtext = 'Command selected:' & @CRLF & @CRLF & '"' & $FILE_FULLPATH & '" ' & $parameters SplashTextOn('Identify Installer', $splashtext, 800, 100, Default, 50, 32) Sleep($time) SplashOff() _ScriptLog('-', $FILE_FULLPATH, $parameters) Else ; Failed to Identify the installer so log the failure _ScriptLog('-', $FILE_FULLPATH, 'Failed to Identify') EndIf If $window_on_top_attrib Then RegWrite('HKCU\Software\PEiD', 'StayOnTop', 'REG_DWORD', $window_on_top_attrib) EndIf EndFunc Func _ScriptLog($exitcode, $fullpath, $parameters) _FileWriteLog(@ScriptDir & '\ErrorLog.log', 'Exitcode ' & $exitcode & ': "' & $FILE_FULLPATH & '"' & $parameters) EndFunc Func _FileType($file, $type) ; Valids the file type selection used for incoming parameter Local $valid, $position _CheckIfFile($file) If $type = '' Then Return $array = StringSplit($type, '|') If Not @error Then For $i = 1 To $array[0] If StringRight($file, StringLen($array[$i])) = $array[$i] Then $valid = True ExitLoop EndIf Next If Not $valid Then $position = StringInStr($type, '|', Default, -1) $type = StringLeft($type, $position - 1) & ' or ' & StringRight($type, StringLen($type) - $position) EndIf ElseIf StringRight($file, StringLen($type)) = $type Then $valid = True EndIf If Not $valid Then _ScriptLog('-', $FILE_FULLPATH, ': Incorrect filetype selected : Supported types = ' & StringReplace($type, '|', ', ') & ' ') ;~ MsgBox(0x40030, Default, 'Incorrect filetype selected' & @CRLF & 'Supported types: ' & StringReplace($type, '|', ', ') & ' ') Exit 999 EndIf EndFunc Func _CheckIfFile($parameter) ; Used to check that incoming parameter is a file If StringInStr(FileGetAttrib($parameter), 'D') Then MsgBox(0x40030, Default, 'This is a directory' & @CRLF & 'A file is required for processing') Exit 999 EndIf EndFunc Func _NoMultiFiles() ; Notify and exit if multiple incoming parameters are passed If $CMDLINE[0] > 1 Then MsgBox(0x40030, Default, 'Multiple file selection is not allowed for this item', 5) Exit 999 EndIf EndFunc Func _File_WorkingDir($parameter) If StringInStr(FileGetAttrib($parameter), 'D') Then Return $parameter Else Return StringLeft($parameter, StringInStr($parameter, '\', 0, -1)) EndIf EndFunc ; Required for CMDLINE use
34.356021
132
0.695824
3c07b7838639e6194565dd76ce7daf3d0afbe4b8
661
au3
AutoIt
Attachments/20K-21K/1-1000/20954/Server.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
3
2021-01-19T19:13:50.000Z
2021-06-20T15:29:16.000Z
Attachments/20K-21K/1-1000/20954/Server.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
Attachments/20K-21K/1-1000/20954/Server.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
#include "TCP.au3" If Not _TCP_Server_Start("127.0.0.1", 30213) Then Exit _TCP_Server_SetOnEvent($Tcp_Server_Event_Open, "_On_Connect") _TCP_Server_SetOnEvent($Tcp_Server_Event_Close, "_On_Close") _TCP_Server_SetOnEvent($Tcp_Server_Event_Recv, "_On_Recv") While 1 Sleep(100) WEnd Func _On_Close($s_Id) ConsoleWrite($s_Id & '->left' & @CRLF) ;Debug, for fun :P EndFunc Func _On_Connect($s_Id) ConsoleWrite($s_Id & '->Connected' & @CRLF) ;Debug, for fun :P EndFunc Func _On_Recv($s_Recv, $s_Id) ConsoleWrite($s_Id & '->message-> ' & $s_Recv & @CRLF) ;Debug, for fun :P _TCP_Server_Send($s_Recv) EndFunc Func OnAutoitExit() _TCP_Server_Stop() EndFunc
24.481481
75
0.744327
afea02809e4c308b9bfa6bfc03a3b1c79fb8d307
205
au3
AutoIt
autoit/Examples/Helpfile/ACos[2].au3
dborio/ShitDeck
a2c9794fb66e1a0c66317fd478be446dc781976a
[ "MIT" ]
21
2019-10-24T04:59:52.000Z
2021-05-11T12:47:17.000Z
autoit/Examples/Helpfile/ACos[2].au3
dborio/ShitDeck
a2c9794fb66e1a0c66317fd478be446dc781976a
[ "MIT" ]
null
null
null
autoit/Examples/Helpfile/ACos[2].au3
dborio/ShitDeck
a2c9794fb66e1a0c66317fd478be446dc781976a
[ "MIT" ]
9
2019-10-26T16:56:08.000Z
2021-03-15T14:10:21.000Z
; Example of using ACos with degrees. #include <Math.au3> #include <MsgBoxConstants.au3> Local $fDegree = _Degree(ACos(-1)) MsgBox($MB_SYSTEMMODAL, Default, "ACos(-1) = " & $fDegree & " degrees")
25.625
72
0.673171
32739daa99379e90317aa4d0495a8e0bdea1db85
150
au3
AutoIt
Source/Libraries/WinAPIEx_3.5/Examples/_WinAPI_GetIdleTime.au3
xptsp/DSI
8a97db88848cf7d1f867e77e24874e3ce8e9c345
[ "BSD-2-Clause" ]
null
null
null
Source/Libraries/WinAPIEx_3.5/Examples/_WinAPI_GetIdleTime.au3
xptsp/DSI
8a97db88848cf7d1f867e77e24874e3ce8e9c345
[ "BSD-2-Clause" ]
null
null
null
Source/Libraries/WinAPIEx_3.5/Examples/_WinAPI_GetIdleTime.au3
xptsp/DSI
8a97db88848cf7d1f867e77e24874e3ce8e9c345
[ "BSD-2-Clause" ]
null
null
null
#Include <WinAPIEx.au3> Opt('MustDeclareVars', 1) While 1 ConsoleWrite('Idle time (ms): ' & _WinAPI_GetIdleTime() & @CR) Sleep(1000) WEnd
16.666667
64
0.66
179b531c269b91dcdc24a9c2cd1e4c4e7b8977e8
2,040
au3
AutoIt
Attachments/38K-39K/8000-9000/38934/Example.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
3
2021-01-19T19:13:50.000Z
2021-06-20T15:29:16.000Z
Attachments/38K-39K/8000-9000/38934/Example.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
Attachments/38K-39K/8000-9000/38934/Example.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.8.1 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <GuiEdit.au3> #include <WindowsConstants.au3> #include <Base64.au3> Global $PacketEND = "[PACKET_END]" ; Defines the end of a packet Global $PacketMSG = "[PACKET_TYPE_0001]" ; Plain text message Global $PacketPNG = "[PACKET_TYPE_0002]" ; Base64 of PNG binary. Global $PacketPCI = "[PACKET_TYPE_0003]" ; UserName@PC name $ip = @IPAddress1 $port = 1337 TCPStartup() $socket = TCPConnect($ip, $port) If @error Then MsgBox(16, "Error", "Could not connect. Exiting.") Exit EndIf Tests() Func Tests() ; Sends a plain message. MsgBox(0, "Test 1", "Sending a plain text message, the packet being send is: " & @CRLF & @CRLF & $PacketMSG & "This is a test message." & $PacketEND) TCPSend($socket, $PacketMSG & "This is a test message." & $PacketEND) ; Sends the current user's name and the computers name. MsgBox(0, "Test 2", "Sending Username and Computername, the packet being sent is: " & @CRLF & @CRLF & $PacketPCI & @UserName & "@" & @ComputerName & $PacketEND) TCPSend($socket, $PacketPCI & @UserName & "@" & @ComputerName & $PacketEND) ; Sends Base64 converted Globe.png MsgBox(0, "Test 3", "Sending Globe.png, the packet being sent is too large to show, but would be: " & @CRLF & @CRLF & $PacketPNG & "Base64_converted_binary" & $PacketEND) $File = @ScriptDir & "\" & "Globe.png" $FileOpen = FileOpen($File, 0) $FileRead = FileRead($FileOpen) $FileRead = BinaryMid($FileRead, 1, BinaryLen($FileRead)) $Encoded = _Base64Encode($FileRead) FileClose($FileOpen) $Base64PNG = $PacketPNG & $Encoded & $PacketEND $Length = StringLen($Base64PNG) For $i = 1 To $Length Step 1000 Sleep(10) TCPSend($socket, StringMid($Base64PNG, $i, 1000)) Next EndFunc
34.576271
171
0.645098
bf8b7c3586babe6a3f46965485274a16bd2bb6e1
2,612
au3
AutoIt
Attachments/1-10K/4000-5000/4704/Debug.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
3
2021-01-19T19:13:50.000Z
2021-06-20T15:29:16.000Z
Attachments/1-10K/4000-5000/4704/Debug.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
Attachments/1-10K/4000-5000/4704/Debug.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
_Debug() ;// start debugging... For $i = 0 To 100 Step 10 _Debug('$i: ' & $i) Next _Debug() ;// end debugging... Func _Debug($msg = '', $ShowWin = False, $Prefix = True) Local $DebugHwnd, $Start = False $DebugHwnd = GlobalVarsRead('DebugHwnd', @ScriptName) If $DebugHwnd <> "" Then $DebugHwnd = Hwnd($DebugHwnd) Else $Start = True $DebugHwnd = AutoItHandle() WinSetTitle($DebugHwnd, '', 'Debug ' & @ScriptName) WinMove($DebugHwnd, '', Default, Default, 400, 400) GlobalVarsWrite('DebugHwnd', $DebugHwnd, @ScriptName) EndIf If NOT IsHwnd($DebugHwnd) Then Return 1 If $ShowWin Then WinSetState($DebugHwnd, '', @SW_SHOW) If $msg <> '' Then If $msg = '[CRLF]' Then $msg = '' ElseIf $Prefix Then $msg = '[' & _CurTime() & '] ' & $msg EndIf ControlAddLine($DebugHwnd, "", 'Edit1', $msg & @CRLF) ElseIf $msg = '' Then If $Start = False Then If NOT IsVisible($DebugHwnd) Then WinSetState($DebugHwnd, '', @SW_SHOW) If NOT WinActive($DebugHwnd) Then WinActivate($DebugHwnd) GlobalVarsDelete('', @ScriptName) WinWaitClose($DebugHwnd) EndIf EndIf EndFunc Func _CurTime() Return @YEAR & "/" & @MON & "/" & @MDAY & " " & @HOUR & ":" & @MIN & ":" & @SEC EndFunc Func AutoItHandle() Local $TS Local $OldTitle, $hwnd $OldTitle = AutoItWinGetTitle() $TS = 1000 * ((3600 * @Hour) + (60 * @Min) + @Sec) AutoItWinSetTitle($TS) $hwnd = WinGetHandle($TS) AutoItWinSetTitle($OldTitle) Return $hwnd EndFunc ;==>AutoItHandle Func GlobalVarsRead($VarName, $Section = 'Other') If $Section = '' Then $Section = 'Other' Return INIRead(@TempDir & '\GlobalVars.ini', $Section, $VarName, '') EndFunc Func GlobalVarsDelete($VarName = '', $Section = 'Other') If $VarName = '' Then Return INIDelete(@TempDir & '\GlobalVars.ini', $Section) Else Return INIDelete(@TempDir & '\GlobalVars.ini', $Section, $VarName) EndIf EndFunc Func GlobalVarsWrite($VarName, $VarValue = '', $Section = '', $File = '') Local $IniFile If $File <> '' Then $IniFile = @TempDir & '\' & $File Else $IniFile = @TempDir & '\GlobalVars.ini' EndIf If $Section = '' Then $Section = 'Other' Return INIWrite($IniFile, $Section, $VarName, $VarValue) EndFunc Func ControlAddLine($window, $Text, $control, $Line) Return ControlSetText($window, $Text, $control, ControlGetText($window, $Text, $control) & $Line) EndFunc ;==>ControlAddLine Func IsVisible($handle) If BitAnd(WinGetState($handle), 2) Then Return True EndFunc
30.729412
100
0.616386
307b98d202dcc1ac7e75baef0b82cb478dc21810
18,821
au3
AutoIt
Parser.au3
Grey-Echo/SlateGenerator2
d45d6348b5f98c46a83b3a2cbd6666132b0c4d82
[ "MIT" ]
null
null
null
Parser.au3
Grey-Echo/SlateGenerator2
d45d6348b5f98c46a83b3a2cbd6666132b0c4d82
[ "MIT" ]
null
null
null
Parser.au3
Grey-Echo/SlateGenerator2
d45d6348b5f98c46a83b3a2cbd6666132b0c4d82
[ "MIT" ]
null
null
null
; This file include every function strictly related to the parsing of data in .lua files ; Get the first comment block after $CarretPos ; We will also grab function declaration if possible/applicable ; The return is a Array : CarretPosition|BlockContent|Declaration|CarretPositionStart Func ReadNextBlock($File, $CarretPos) local $CommentBlock = "" ; This is where we'll store the comment block local $Declaration = "" ; This is the next line after the comment block : usually the declaration statement local $CurrentLine = "" local $CurrentCarretPos = 0 local $IsCommentBlock = False local $RegExResult local $RegexPos ; Start reading from $CarretPos FileSetPos($File, $CarretPos, $FILE_BEGIN) ; Read till we find a comment block Do $CurrentLine = FileReadLine($File) If @error Then ; We probably reached the eof Local $ReturnArray[3] = [$CurrentCarretPos, "", ""] Return $ReturnArray ElseIf StringInStr($CurrentLine, "---") Then $IsCommentBlock = True EndIf Until $IsCommentBlock Local $CarretPosStart = FileGetPos($File) - StringLen($CurrentLine) - 2 ; Add the first line to our comment block $RegExResult = StringRegExp($CurrentLine, "---(.*)", $STR_REGEXPARRAYMATCH) If Not @error Then ; The first line of the comment could be empty ! $CommentBlock &= $RegExResult[0]&@CRLF EndIf ; Read the comment block Do $CurrentCarretPos = FileGetPos($File) $CurrentLine = FileReadLine($File) If StringInStr($CurrentLine, "--") Then ; If we can't find any "--" in the line, then it's not the comment block anymore $RegExResult = StringRegExp($CurrentLine, "--(.*)", $STR_REGEXPARRAYMATCH) If Not @error Then; The line of the comment could be empty ! $CommentBlock &= $RegExResult[0]&@CRLF EndIf Else $IsCommentBlock = False EndIf Until Not $IsCommentBlock ; Ok, so now this is strange. If the comment block is class', we're going to have to check the ; next comment block. If this next comment block contains a field, that is the same name as the class, then this ; new comment block contains the whole informtion for the class. This is very shitty, but it's a workaround to ; make intellisense show classes info while programing If ParseForOneTag($CommentBlock, "@type") Then Local $CommentBlock2 = "" Do $CurrentLine = FileReadLine($File) If @error Then Local $ReturnArray[3] = [$CurrentCarretPos, "", ""] Return $ReturnArray ElseIf StringInStr($CurrentLine, "---") Then $IsCommentBlock = True EndIf Until $IsCommentBlock $RegExResult = StringRegExp($CurrentLine, "---(.*)", $STR_REGEXPARRAYMATCH) If Not @error Then $CommentBlock2 &= $RegExResult[0]&@CRLF EndIf ; Yep, the next comment is the description of the class, let's read on ! If StringInStr($CurrentLine, ParseForOneTag($CommentBlock, "@type")) And StringInStr($CurrentLine, "extend") Then Do $CurrentLine = FileReadLine($File) If StringInStr($CurrentLine, "--") Then $RegExResult = StringRegExp($CurrentLine, "--(.*)", $STR_REGEXPARRAYMATCH) If Not @error Then $CommentBlock2 &= $RegExResult[0]&@CRLF EndIf Else $IsCommentBlock = False EndIf Until Not $IsCommentBlock ; remove the line(s) with "@field" in the comment block. They are only needed for the intellisense hack While 1 $RegexResult = StringRegExp($CommentBlock2, "(.*)@field(.*)", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop $CommentBlock2 = StringRegExpReplace($CommentBlock2, "(.*)@field(.*)", "", 1) WEnd ; We also don't need the first line of the first comment block anymore... ; $CommentBlock = StringRegExpReplace($CommentBlock, "(.*)", "", 1) ; append the description at the start of the comment block $CommentBlock = $CommentBlock2&$CommentBlock EndIf ; We also need to check if the type is a list or a map. If so, the comment block does not describe a class, but a simple list / map. ; It will have the formatting of a class, though, because it's closer closer to the actual code, even though it is highly confusing. ; But it will only have 1 field : the list or map. If StringInStr($CommentBlock, "@list") Then $RegExResult = StringRegExp($CommentBlock, "@list\h<(.*?)>\h(.*)", $STR_REGEXPARRAYMATCH) if not @error Then $CommentBlock &= "@field #table["&$RegExResult[0]&"] "&$RegExResult[1] EndIf EndIf ; TODO : Add support for @map the same way... EndIf ; We'll take the next line, as it might be the declaration statement $Declaration = $CurrentLine ; let's do some cleanup $CommentBlock = StringRegExpReplace($CommentBlock, "(?m)^\h+", "") ;remove leading whitespaces $CommentBlock = StringRegExpReplace($CommentBlock, "(?m)\h+$", "") ;remove trailing whitespaces $CommentBlock = StringRegExpReplace($CommentBlock, "(?m)^[#]+", "##### ") $CommentBlock = StringRegExpReplace($CommentBlock, "(?m)^\h+", "") ;remove leading whitespaces again now that we removed the "#"s $CommentBlock = StringRegExpReplace($CommentBlock, "(?m)-{3,}", "") ;remove sequences of at least 3 "-" which will mess up markdown $CommentBlock = StringRegExpReplace($CommentBlock, "(?m)={3,}", "") ; remove sequences of at least 3 "=" which will mess up markdown Local $ReturnArray[4] = [$CurrentCarretPos, $CommentBlock, $Declaration, $CarretPosStart] Return $ReturnArray EndFunc ; Parses the block and returns the data for one tag ; don't use it to find the function tag ! Func ParseForOneTag($Block, $Tag) Local $i = 1 Local $DataArray[1] Local $RegexResult[1] Local $RegexPos = 1 Local $Regex ; If we look for @usage, then it's a multiline data, the regex is different If $Tag == "@usage" Then $Regex = "(?s)@usage(.*)" $RegexResult = StringRegExp($Block, $Regex, $STR_REGEXPARRAYMATCH, $RegexPos) Else $Regex = $Tag&"\h(.*)\s" $RegexResult = StringRegExp($Block, $Regex, $STR_REGEXPARRAYMATCH, $RegexPos) Endif If @error Then Return "" Else Return $RegexResult[0] EndIf EndFunc ;==>ReadOneTag ; Parses the block and returns the data for multiple tags in an array ; Don't use it for @param ! Func ParseForTags($Block, $Tag) Local $i = 1 Local $DataArray[1] Local $RegexResult[1] Local $RegexPos = 1 Local $Regex = $Tag&"(?m)\h([^\s]*)(?:\h)?([^\s]*)?(?:\h)?(.*)?$" ; For each tag While True $RegexResult = StringRegExp($Block, $Regex, $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If $RegexPos == 0 Then ; We couldn't find any tag If Not $DataArray[0] Then Return "" Else Return $DataArray EndIf EndIf ; Add the tag to the array.The array looks like this : type1|param1|description1|type2... ReDim $DataArray[$i * 3] $DataArray[($i * 3) - 3] = $RegexResult[0] If $RegexResult[1] == "" Then $DataArray[($i * 3) - 2] = "self" ; if the first param doesn't have a name, then it's self Else $DataArray[($i * 3) - 2] = $RegexResult[1] EndIf $DataArray[($i * 3) - 1] = $RegexResult[2] $i += 1 WEnd EndFunc ; Parses both the comment block and the declaration to find the function name and it's type ; Compares both of them if possible, but will always return the one in the comment block if possible Func ParseFunctionName($CommentBlock, $Declaration) local $RegExResult local $FunctionNameFromDec local $FunctionNameFromComment local $ReturnArray[2] ; Parse for function name in both the comment block and the desclaration $RegExResult = StringRegExp($CommentBlock, "\@function\h(?:(\[.*\]\h))?(.*)", $STR_REGEXPARRAYMATCH) If Not @error Then $FunctionNameFromComment = $RegExResult[1] EndIf $RegExResult = StringRegExp($Declaration, "function\h(?:.*\:)?(.*)\(.*\)", $STR_REGEXPARRAYMATCH) If Not @error Then $FunctionNameFromDec = $RegExResult[0] EndIf ; compare them to each other If $FunctionNameFromComment Then If $FunctionNameFromDec <> $FunctionNameFromComment Then FileWrite($Log,"CAUTION : The commented function doesn't match its declaration : "&$FunctionNameFromComment& " -> "&$Declaration&@CRLF) EndIf $ReturnArray[0] = $FunctionNameFromComment ElseIf $FunctionNameFromDec Then ;FileWrite($Log, "CAUTION: No data matching @function found in block, inferring the function name from its declaration : "& $FunctionNameFromDec & @CRLF) $ReturnArray[0] = $FunctionNameFromDec Else $ReturnArray[0] = "" $ReturnArray[1] = "" return $ReturnArray EndIf ;parses for function type in both the comment block and the desclaration local $TypeFromComment local $TypeFromDec $RegExResult = StringRegExp($Declaration, "function\h(.*):", $STR_REGEXPARRAYMATCH) If Not @error Then $TypeFromDec = $RegExResult[0] EndIf $RegExResult = StringRegExp($CommentBlock, "function\h\[parent=#(.*)\]", $STR_REGEXPARRAYMATCH) If Not @error Then $TypeFromComment = $RegExResult[0] EndIf ; compare them to each other If $TypeFromComment Then If $TypeFromDec <> $TypeFromComment Then FileWrite($Log,"CAUTION : The commented function type doesn't match its declaration : "&$TypeFromComment& " -> "&$Declaration&@CRLF) EndIf $ReturnArray[1] = $TypeFromComment ElseIf $TypeFromDec Then ;FileWrite($Log, "CAUTION: No function type found in block, inferring the function type from its declaration : "& $TypeFromDec & @CRLF) $ReturnArray[1] = $TypeFromDec Else $ReturnArray[0] = "" $ReturnArray[1] = "" return $ReturnArray EndIf Return $ReturnArray EndFunc ; Specifically designed to parse for @param tags ; will verify the comment by matching with the declaration (theoretically, I'm pretty sure it's bugged) Func ParseParams($CommentBlock, $Declaration) Local $ParamsFromComment = ParseForTags($CommentBlock, "@param") Local $RegExResult Local $RegexPos = StringInStr($Declaration, "(") Local $ParamsFromDec[0] Local $NbParam = 0 If StringInStr($Declaration, ":") Then $NbParam = 1 ReDim $ParamsFromDec[1] $ParamsFromDec[0] = "self" EndIf ; extract params from function decaration While True $RegExResult = StringRegExp($Declaration, "([^,\(\)\h]+)", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop $NbParam += 1 Redim $ParamsFromDec[$NbParam] $ParamsFromDec[$NbParam-1] = $RegExResult[0] WEnd ; compare these parameters with those found in the comment block If UBound($ParamsFromComment) <> UBound($ParamsFromDec)*3 Then FileWrite($Log, "CAUTION: The number of parameters don't match between the comment block and declaration "& @CRLF) Else For $i=0 To $NbParam-1 If $ParamsFromDec[$i] <> $ParamsFromComment[($i*3)+1] Then FileWrite($Log, "CAUTION: Parameters missmatch between the comment block and declaration "& @CRLF) FileWrite($Log, $ParamsFromComment[($i*3)+1]& " -> " & $ParamsFromDec[$i]&@CRLF) ExitLoop EndIf Next EndIf Return $ParamsFromComment EndFunc ; This does 3 things : ; - Replace the hyperlinks with new ones ; - change the stuff starting with # (#nil -> <u>Nil</u>) ; - Replace pictures paths Func ReplaceHyperlinks($TempFile) Local $StringFile = "" Local $RegexResult Local $RegexPos = 1 Local $NewURL = "" Local $i = 0 FileSetPos($TempFile, 0, $FILE_BEGIN) $StringFile = FileRead($TempFile) ; Replace HyperLinks Using Regexs ; --------------------------------------------------------- While 1 ; @{File.Module} $RegexResult = StringRegExp($StringFile, "\@{([A-Z][^\.#}]+)\.([^\.#}]+)}", $STR_REGEXPARRAYMATCH, $RegexPos) ; $RegexPos = @extended If @extended == 0 Then ExitLoop $NewURL = "[" & $RegexResult[1] & "](#" & StringLower($RegexResult[1]) & "-module-)" ;FileWrite($Log, "Module : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) $StringFile = StringRegExpReplace($StringFile, "\@{([A-Z][^\.#}]+)\.([^\.#}]+)}", $NewURL, 1) WEnd While 1 ; @{Module} $RegexResult = StringRegExp($StringFile, "\@{([A-Z][^\.#}]+)}", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop $NewURL = "[" & $RegexResult[0] & "](#" & StringLower($RegexResult[0]) & "-module-)" ;FileWrite($Log, "Module : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) $StringFile = StringRegExpReplace($StringFile, "\@{([A-Z][^\.#}]+)}", $NewURL, 1) WEnd While 1 ; @{File.Module#TYPE} $RegexResult = StringRegExp($StringFile, "\@{([A-Z][^\.#}]+)\.([A-Z][^\.#}]+)#([A-Z,_]+)}", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop $NewURL = "[" & $RegexResult[2] & "](#" & StringLower($RegexResult[2]) & "-class-)" ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) $StringFile = StringRegExpReplace($StringFile, "\@{([A-Z][^\.#}]+)\.([A-Z][^\.#}]+)#([A-Z,_]+)}", $NewURL, 1) WEnd While 1 ; @{Module#TYPE} $RegexResult = StringRegExp($StringFile, "\@{([A-Z][^\.#}]+)#([A-Z,_]+)}", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop $NewURL = "[" & $RegexResult[1] & "](#" & StringLower($RegexResult[1]) & "-class-)" ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) $StringFile = StringRegExpReplace($StringFile, "\@{([A-Z][^\.#}]+)#([A-Z,_]+)}", $NewURL, 1) WEnd While 1 ; @{#TYPE} $RegexResult = StringRegExp($StringFile, "\@{#([A-Z,_]+)}", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop $NewURL = "[" & $RegexResult[0] & "](#" & StringLower($RegexResult[0]) & "-class-)" ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) $StringFile = StringRegExpReplace($StringFile, "\@{#([A-Z,_]+)}", $NewURL, 1) WEnd While 1 ; #TYPE&@CR $RegexResult = StringRegExp($StringFile, "\h#([A-Z,_]+)\s", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop $NewURL = " [" & $RegexResult[0] & "](#" & StringLower($RegexResult[0]) & "-class-)"&@CRLF ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) $StringFile = StringRegExpReplace($StringFile, "\h#([A-Z,_]+)\s", $NewURL, 1) WEnd While 1 ; @{File.Module#TYPE.Function}(), catches the parenthesis $RegexResult = StringRegExp($StringFile, "\@{([A-Z][^#}\.]+)\.([A-Z][^#}\.]+)#([A-Z,_]+)\.([^#\.]+)}[\(]?[\)]?", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop $NewURL = FindInFunctionList($RegexResult[2] & "-" & $RegexResult[3]&"-") ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) $StringFile = StringRegExpReplace($StringFile, "\@{([A-Z][^#}\.]+)\.([A-Z][^#}\.]+)#([A-Z,_]+)\.([^#\.]+)}[\(]?[\)]?", $NewURL, 1) WEnd While 1 ; @{Module#TYPE.Function}(), catches the parenthesis $RegexResult = StringRegExp($StringFile, "\@{([A-Z][^#}\.]+)#([A-Z,_]+)\.([^#}\.]+)}[\(]?[\)]?", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop $NewURL = FindInFunctionList($RegexResult[1] & "-" & $RegexResult[2]&"-") ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) $StringFile = StringRegExpReplace($StringFile, "\@{([A-Z][^#}\.]+)#([A-Z,_]+)\.([^#}\.]+)}[\(]?[\)]?", $NewURL, 1) WEnd While 1 ; @{#TYPE.Function}(), catches the parenthesis $RegexResult = StringRegExp($StringFile, "\@{#([A-Z,_]+)\.([^#}\.]+)}[\(]?[\)]?", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop $NewURL = FindInFunctionList($RegexResult[0] & "-" & $RegexResult[1]&"-") ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) $StringFile = StringRegExpReplace($StringFile, "\@{#([A-Z,_]+)\.([^#}\.]+)}[\(]?[\)]?", $NewURL, 1) WEnd While 1 ; Module#TYPE $RegexResult = StringRegExp($StringFile, "\h(\w+[^\h\_])#(.*?)\h", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop $NewURL = " [" & $RegexResult[1] & "](#" & StringLower($RegexResult[1]) & "-class-) " ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) $StringFile = StringRegExpReplace($StringFile, "\h(\w+[^\h\_])#(.*?)\h", $NewURL, 1) WEnd While 1 ; File.Module#TYPE $RegexResult = StringRegExp($StringFile, "\h(\w+)\.(\w+)#(.*?)\h", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop $NewURL = " [" & $RegexResult[2] & "](#" & StringLower($RegexResult[2]) & "-class-) " ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) $StringFile = StringRegExpReplace($StringFile, "\h(\w+)\.(\w+)#(.*?)\h", $NewURL, 1) WEnd While 1 ; #TYPE.type (nested type... really annoying and confusing lua stuff) $RegexResult = StringRegExp($StringFile, "\h#([A-Z,_]+)\.(\w+)\h", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop $NewURL = " [" & $RegexResult[1] & "](#" &StringLower($RegexResult[0])& "-"& StringLower($RegexResult[1]) & "-class-)" ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) $StringFile = StringRegExpReplace($StringFile, "\h#([A-Z,_]+)\.(\w+)\h", $NewURL, 1) WEnd ; Clean stuff with # ; --------------------------------------------------------- $StringFile = StringReplace($StringFile, "#nil", "<u>Nil</u>") $StringFile = StringReplace($StringFile, "#number", "<u>Number</u>") $StringFile = StringReplace($StringFile, "#boolean", "<u>Boolean</u>") $StringFile = StringReplace($StringFile, "#string", "<u>String</u>") $StringFile = StringReplace($StringFile, "#table", "<u>List[]</u>") $StringFile = StringReplace($StringFile, "#function", "<u>Function()</u>") ; And replace the pictures Path if any ; --------------------------------------------------------- While 1 $RegexResult = StringRegExp($StringFile, "!\[(.*)\]\(.*\\(.*)\\(.*)\)", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop $NewPic = "![" & $RegexResult[0] & "](/includes/Pictures/" & $RegexResult[1] & "/"& $RegexResult[2]&")" $StringFile = StringRegExpReplace($StringFile, "!\[(.*)\]\(.*\\(.*)\\(.*)\)", $NewPic, 1) WEnd While 1 $RegexResult = StringRegExp($StringFile, "(?m)^(\d(?:(\.\d))*\)(.*))$", $STR_REGEXPARRAYMATCH, $RegexPos) $RegexPos = @extended If @extended == 0 Then ExitLoop ;$StringFile = StringRegExpReplace($StringFile, "(?m)^(\d(?:(\.\d))*\)(.*))$", "<h4>"&$RegExResult[0]&"</h4>", 1) $StringFile = StringRegExpReplace($StringFile, "(?m)^(\d(?:(\.\d))*\)(.*))$", "##### "&$RegExResult[0], 1) WEnd Return $StringFile EndFunc
40.915217
155
0.650656
1f91f67b42c49b451a73d1cb1b9bf35652d30023
2,320
au3
AutoIt
Attachments/37K-38K/7000-8000/37869/vxpgs3b.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
3
2021-01-19T19:13:50.000Z
2021-06-20T15:29:16.000Z
Attachments/37K-38K/7000-8000/37869/vxpgs3b.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
Attachments/37K-38K/7000-8000/37869/vxpgs3b.au3
YehudaEi/AutoIt-Attachment
f42d2a1316934f8bf16c606b228350f7fd84d76d
[ "MIT" ]
null
null
null
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=gender select.kxf $Form2 = GUICreate("Select Gender", 279, 213, 361, 262) GUISetBkColor(0xA0A0A4) $GroupBox1 = GUICtrlCreateGroup("", 24, 1, 233, 193) GUICtrlSetBkColor(-1, 0xA0A0A4) $label2 = GUICtrlCreateLabel("or", 135, 168, 15, 17) GUICtrlSetBkColor(-1, 0xA0A0A4) $Label1 = GUICtrlCreateLabel("Click on the Gender of the New User", 48, 136, 177, 18) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("Male", 30, 163, 75, 25, $BS_PUSHLIKE) GUICtrlSetBkColor(-1, 0x0054E3) $Button2 = GUICtrlCreateButton("Female", 173, 163, 75, 25, $BS_PUSHLIKE) GUICtrlSetBkColor(-1, 0xFF00FF) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ;insert code here MsgBox(4, "", "Are you sure ? This will Install the Default settings") ;I would like to install from here or go back to the beging dependent on the response to ;the yes or no buttons displayed by the msgbox4 function. yes =instal and exit no = go back to the begining ;of selection routine. ;I need the msgbox to be displayed in line with and on top of the main window Exit Case $Button1 _maleFunction() Case $Button2 _femaleFunction() EndSwitch WEnd Func _maleFunction() ;insert code here MsgBox(4, "", "Are you sure about Installing settings for a Male ?") ;I would like to install from here or go back to the beging dependent on the response to ; the yes or no buttons displayed by the msgbox4 function. yes =install and exit,no = go back to the begining ;I need the msgbox to be displayed in line with and on top of the main window ;I need to store the response into a variable for later use Exit EndFunc Func _femaleFunction() ;insert code here MsgBox(4, "", "Are you sure about Installing Female settings?") ;I would like to install from here or go back to the beging dependent on the response to ; the yes or no buttons displayed by the msgbox4 function. yes =install and exit, no = go back to the begining ;I need the msgbox to be displayed in line with and on top of the main window ;I need to store the response into a variable for later use Exit EndFunc
38.666667
113
0.731466
dd0816ae7b989f1ab189aec4516de38dbe0e2181
52,749
au3
AutoIt
AutoitBeginnerTutorial/DotNet/Includes/DotNetAll.au3
hardikeprajapati/AutoITBeginner
b909fb2aab7710967be4857b400e4b34aa6d9773
[ "MIT" ]
null
null
null
AutoitBeginnerTutorial/DotNet/Includes/DotNetAll.au3
hardikeprajapati/AutoITBeginner
b909fb2aab7710967be4857b400e4b34aa6d9773
[ "MIT" ]
null
null
null
AutoitBeginnerTutorial/DotNet/Includes/DotNetAll.au3
hardikeprajapati/AutoITBeginner
b909fb2aab7710967be4857b400e4b34aa6d9773
[ "MIT" ]
null
null
null
#include-once ; #################################################################################################### ; ### ### ; ### Variant.au3 ### ; ### ### ; #################################################################################################### ; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; Copied from AutoItObject.au3 by the AutoItObject-Team: monoceres, trancexx, Kip, ProgAndy ; https://www.autoitscript.com/forum/index.php?showtopic=110379 Global Const $tagVARIANT = "word vt;word r1;word r2;word r3;ptr data; ptr" ; The structure takes up 16/24 bytes when running 32/64 bit ; Space for the data element at the end represents 2 pointers ; This is 8 bytes running 32 bit and 16 bytes running 64 bit Global Const $VT_EMPTY = 0 ; 0x0000 Global Const $VT_NULL = 1 ; 0x0001 Global Const $VT_I2 = 2 ; 0x0002 Global Const $VT_I4 = 3 ; 0x0003 Global Const $VT_R4 = 4 ; 0x0004 Global Const $VT_R8 = 5 ; 0x0005 Global Const $VT_CY = 6 ; 0x0006 Global Const $VT_DATE = 7 ; 0x0007 Global Const $VT_BSTR = 8 ; 0x0008 Global Const $VT_DISPATCH = 9 ; 0x0009 Global Const $VT_ERROR = 10 ; 0x000A Global Const $VT_BOOL = 11 ; 0x000B Global Const $VT_VARIANT = 12 ; 0x000C Global Const $VT_UNKNOWN = 13 ; 0x000D Global Const $VT_DECIMAL = 14 ; 0x000E Global Const $VT_I1 = 16 ; 0x0010 Global Const $VT_UI1 = 17 ; 0x0011 Global Const $VT_UI2 = 18 ; 0x0012 Global Const $VT_UI4 = 19 ; 0x0013 Global Const $VT_I8 = 20 ; 0x0014 Global Const $VT_UI8 = 21 ; 0x0015 Global Const $VT_INT = 22 ; 0x0016 Global Const $VT_UINT = 23 ; 0x0017 Global Const $VT_VOID = 24 ; 0x0018 Global Const $VT_HRESULT = 25 ; 0x0019 Global Const $VT_PTR = 26 ; 0x001A Global Const $VT_SAFEARRAY = 27 ; 0x001B Global Const $VT_CARRAY = 28 ; 0x001C Global Const $VT_USERDEFINED = 29 ; 0x001D Global Const $VT_LPSTR = 30 ; 0x001E Global Const $VT_LPWSTR = 31 ; 0x001F Global Const $VT_RECORD = 36 ; 0x0024 Global Const $VT_INT_PTR = 37 ; 0x0025 Global Const $VT_UINT_PTR = 38 ; 0x0026 Global Const $VT_FILETIME = 64 ; 0x0040 Global Const $VT_BLOB = 65 ; 0x0041 Global Const $VT_STREAM = 66 ; 0x0042 Global Const $VT_STORAGE = 67 ; 0x0043 Global Const $VT_STREAMED_OBJECT = 68 ; 0x0044 Global Const $VT_STORED_OBJECT = 69 ; 0x0045 Global Const $VT_BLOB_OBJECT = 70 ; 0x0046 Global Const $VT_CF = 71 ; 0x0047 Global Const $VT_CLSID = 72 ; 0x0048 Global Const $VT_VERSIONED_STREAM = 73 ; 0x0049 Global Const $VT_BSTR_BLOB = 0xFFF Global Const $VT_VECTOR = 0x1000 Global Const $VT_ARRAY = 0x2000 Global Const $VT_BYREF = 0x4000 Global Const $VT_RESERVED = 0x8000 Global Const $VT_ILLEGAL = 0xFFFF Global Const $VT_ILLEGALMASKED = 0xFFF Global Const $VT_TYPEMASK = 0xFFF ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;Global Const $tagVARIANT = "word vt;word r1;word r2;word r3;ptr data; ptr" ; The structure takes up 16/24 bytes when running 32/64 bit ; Space for the data element at the end represents 2 pointers ; This is 8 bytes running 32 bit and 16 bytes running 64 bit #cs DECIMAL structure https://msdn.microsoft.com/en-us/library/windows/desktop/ms221061(v=vs.85).aspx From oledb.h: typedef struct tagDEC { USHORT wReserved; ; vt, 2 bytes union { ; r1, 2 bytes struct { BYTE scale; BYTE sign; }; USHORT signscale; }; ULONG Hi32; ; r2, r3, 4 bytes union { ; data, 8 bytes struct { #ifdef _MAC ULONG Mid32; ULONG Lo32; #else ULONG Lo32; ULONG Mid32; #endif }; ULONGLONG Lo64; }; } DECIMAL; #ce Global Const $tagDEC = "word wReserved;byte scale;byte sign;uint Hi32;uint Lo32;uint Mid32" ; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; Variant functions ; Copied from AutoItObject.au3 by the AutoItObject-Team: monoceres, trancexx, Kip, ProgAndy ; https://www.autoitscript.com/forum/index.php?showtopic=110379 ; #FUNCTION# ==================================================================================================================== ; Name...........: VariantClear ; Description ...: Clears the value of a variant ; Syntax.........: VariantClear($pvarg) ; Parameters ....: $pvarg - the VARIANT to clear ; Return values .: Success - 0 ; Failure - nonzero ; Author ........: Prog@ndy ; Modified.......: ; Remarks .......: ; Related .......: VariantFree ; Link ..........: http://msdn.microsoft.com/en-us/library/ms221165.aspx ; Example .......: ; =============================================================================================================================== Func VariantClear($pvarg) ; Author: Prog@ndy Local $aCall = DllCall("OleAut32.dll", "long", "VariantClear", "ptr", $pvarg) If @error Then Return SetError(1, 0, 1) Return $aCall[0] EndFunc ; #FUNCTION# ==================================================================================================================== ; Name...........: VariantCopy ; Description ...: Copies a VARIANT to another ; Syntax.........: VariantCopy($pvargDest, $pvargSrc) ; Parameters ....: $pvargDest - Destionation variant ; $pvargSrc - Source variant ; Return values .: Success - 0 ; Failure - nonzero ; Author ........: Prog@ndy ; Modified.......: ; Remarks .......: ; Related .......: VariantRead ; Link ..........: http://msdn.microsoft.com/en-us/library/ms221697.aspx ; Example .......: ; =============================================================================================================================== Func VariantCopy($pvargDest, $pvargSrc) ; Author: Prog@ndy Local $aCall = DllCall("OleAut32.dll", "long", "VariantCopy", "ptr", $pvargDest, 'ptr', $pvargSrc) If @error Then Return SetError(1, 0, 1) Return $aCall[0] EndFunc ; #FUNCTION# ==================================================================================================================== ; Name...........: VariantInit ; Description ...: Initializes a variant. ; Syntax.........: VariantInit($pvarg) ; Parameters ....: $pvarg - the VARIANT to initialize ; Return values .: Success - 0 ; Failure - nonzero ; Author ........: Prog@ndy ; Modified.......: ; Remarks .......: ; Related .......: VariantClear ; Link ..........: http://msdn.microsoft.com/en-us/library/ms221402.aspx ; Example .......: ; =============================================================================================================================== Func VariantInit($pvarg) ; Author: Prog@ndy Local $aCall = DllCall("OleAut32.dll", "long", "VariantInit", "ptr", $pvarg) If @error Then Return SetError(1, 0, 1) Return $aCall[0] EndFunc ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Func VariantChangeType( $pVarDest, $pVarSrc, $wFlags, $vt ) Local $aRet = DllCall( "OleAut32.dll", "long", "VariantChangeType", "ptr", $pVarDest, "ptr", $pVarSrc, "word", $wFlags, "word", $vt ) If @error Then Return SetError(1,0,1) Return $aRet[0] EndFunc Func VariantChangeTypeEx( $pVarDest, $pVarSrc, $lcid, $wFlags, $vt ) Local $aRet = DllCall( "OleAut32.dll", "long", "VariantChangeTypeEx", "ptr", $pVarDest, "ptr", $pVarSrc, "word", $lcid, "word", $wFlags, "word", $vt ) If @error Then Return SetError(1,0,1) Return $aRet[0] EndFunc Func VarAdd( $pVarLeft, $pVarRight, $pVarResult ) Local $aRet = DllCall( "OleAut32.dll", "long", "VarAdd", "ptr", $pVarLeft, "ptr", $pVarRight, "ptr", $pVarResult ) If @error Then Return SetError(1,0,1) Return $aRet[0] EndFunc Func VarSub( $pVarLeft, $pVarRight, $pVarResult ) Local $aRet = DllCall( "OleAut32.dll", "long", "VarSub", "ptr", $pVarLeft, "ptr", $pVarRight, "ptr", $pVarResult ) If @error Then Return SetError(1,0,1) Return $aRet[0] EndFunc ; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; BSTR (basic string) functions ; Copied from AutoItObject.au3 by the AutoItObject-Team: monoceres, trancexx, Kip, ProgAndy ; https://www.autoitscript.com/forum/index.php?showtopic=110379 Func SysAllocString( $str ) Local $aRet = DllCall( "OleAut32.dll", "ptr", "SysAllocString", "wstr", $str ) If @error Then Return SetError(1, 0, 0) Return $aRet[0] EndFunc Func SysFreeString( $pBSTR ) If Not $pBSTR Then Return SetError(1, 0, 0) DllCall( "OleAut32.dll", "none", "SysFreeString", "ptr", $pBSTR ) If @error Then Return SetError(2, 0, 0) EndFunc Func SysReadString( $pBSTR, $iLen = -1 ) If Not $pBSTR Then Return SetError(1, 0, "") If $iLen < 1 Then $iLen = SysStringLen( $pBSTR ) If $iLen < 1 Then Return SetError(2, 0, "") Return DllStructGetData( DllStructCreate( "wchar[" & $iLen & "]", $pBSTR ), 1 ) EndFunc Func SysStringLen( $pBSTR ) If Not $pBSTR Then Return SetError(1, 0, 0) Local $aRet = DllCall( "OleAut32.dll", "uint", "SysStringLen", "ptr", $pBSTR ) If @error Then Return SetError(2, 0, 0) Return $aRet[0] EndFunc ; #################################################################################################### ; ### ### ; ### SafeArray.au3 ### ; ### ### ; #################################################################################################### ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Global Const $tagSAFEARRAYBOUND = _ "ulong cElements;" & _ ; The number of elements in the dimension. "long lLbound;" ; The lower bound of the dimension. Global Const $tagSAFEARRAY = _ "ushort cDims;" & _ ; The number of dimensions. "ushort fFeatures;" & _ ; Flags, see below. "ulong cbElements;" & _ ; The size of an array element. "ulong cLocks;" & _ ; The number of times the array has been locked without a corresponding unlock. "ptr pvData;" & _ ; The data. $tagSAFEARRAYBOUND ; One $tagSAFEARRAYBOUND for each dimension. ; fFeatures flags Global Const $FADF_AUTO = 0x0001 ; An array that is allocated on the stack. Global Const $FADF_STATIC = 0x0002 ; An array that is statically allocated. Global Const $FADF_EMBEDDED = 0x0004 ; An array that is embedded in a structure. Global Const $FADF_FIXEDSIZE = 0x0010 ; An array that may not be resized or reallocated. Global Const $FADF_RECORD = 0x0020 ; An array that contains records. When set, there will be a pointer to the IRecordInfo interface at negative offset 4 in the array descriptor. Global Const $FADF_HAVEIID = 0x0040 ; An array that has an IID identifying interface. When set, there will be a GUID at negative offset 16 in the safearray descriptor. Flag is set only when FADF_DISPATCH or FADF_UNKNOWN is also set. Global Const $FADF_HAVEVARTYPE = 0x0080 ; An array that has a variant type. The variant type can be retrieved with SafeArrayGetVartype. Global Const $FADF_BSTR = 0x0100 ; An array of BSTRs. Global Const $FADF_UNKNOWN = 0x0200 ; An array of IUnknown*. Global Const $FADF_DISPATCH = 0x0400 ; An array of IDispatch*. Global Const $FADF_VARIANT = 0x0800 ; An array of VARIANTs. Global Const $FADF_RESERVED = 0xF008 ; Bits reserved for future use. ; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; Safearray functions ; Copied from AutoItObject.au3 by the AutoItObject-Team: monoceres, trancexx, Kip, ProgAndy ; https://www.autoitscript.com/forum/index.php?showtopic=110379 Func SafeArrayCreate($vType, $cDims, $rgsabound) ; Author: Prog@ndy Local $aCall = DllCall("OleAut32.dll", "ptr", "SafeArrayCreate", "dword", $vType, "uint", $cDims, 'struct*', $rgsabound) If @error Then Return SetError(1, 0, 0) Return $aCall[0] EndFunc Func SafeArrayDestroy($pSafeArray) ; Author: Prog@ndy Local $aCall = DllCall("OleAut32.dll", "int", "SafeArrayDestroy", "ptr", $pSafeArray) If @error Then Return SetError(1, 0, 1) Return $aCall[0] EndFunc Func SafeArrayAccessData($pSafeArray, ByRef $pArrayData) ; Author: Prog@ndy Local $aCall = DllCall("OleAut32.dll", "int", "SafeArrayAccessData", "ptr", $pSafeArray, 'ptr*', 0) If @error Then Return SetError(1, 0, 1) $pArrayData = $aCall[2] Return $aCall[0] EndFunc Func SafeArrayUnaccessData($pSafeArray) ; Author: Prog@ndy Local $aCall = DllCall("OleAut32.dll", "int", "SafeArrayUnaccessData", "ptr", $pSafeArray) If @error Then Return SetError(1, 0, 1) Return $aCall[0] EndFunc Func SafeArrayGetUBound($pSafeArray, $iDim, ByRef $iBound) ; Author: Prog@ndy Local $aCall = DllCall("OleAut32.dll", "int", "SafeArrayGetUBound", "ptr", $pSafeArray, 'uint', $iDim, 'long*', 0) If @error Then Return SetError(1, 0, 1) $iBound = $aCall[3] Return $aCall[0] EndFunc Func SafeArrayGetLBound($pSafeArray, $iDim, ByRef $iBound) ; Author: Prog@ndy Local $aCall = DllCall("OleAut32.dll", "int", "SafeArrayGetLBound", "ptr", $pSafeArray, 'uint', $iDim, 'long*', 0) If @error Then Return SetError(1, 0, 1) $iBound = $aCall[3] Return $aCall[0] EndFunc Func SafeArrayGetDim($pSafeArray) Local $aResult = DllCall("OleAut32.dll", "uint", "SafeArrayGetDim", "ptr", $pSafeArray) If @error Then Return SetError(1, 0, 0) Return $aResult[0] EndFunc ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Func SafeArrayCopy( $pSafeArrayIn, ByRef $pSafeArrayOut ) Local $aRet = DllCall( "OleAut32.dll", "int", "SafeArrayCopy", "ptr", $pSafeArrayIn, "ptr*", 0 ) If @error Then Return SetError(1,0,1) $pSafeArrayOut = $aRet[2] Return $aRet[0] EndFunc Func SafeArrayCreateEmpty( $vType ) Local $tsaBound = DllStructCreate( $tagSAFEARRAYBOUND ) DllStructSetData( $tsaBound, "cElements", 0 ) DllStructSetData( $tsaBound, "lLbound", 0 ) Return SafeArrayCreate( $vType, 0, $tsaBound ) EndFunc Func SafeArrayDestroyData( $pSafeArray ) Local $aRet = DllCall( "OleAut32.dll", "int", "SafeArrayDestroyData", "ptr", $pSafeArray ) If @error Then Return SetError(1,0,1) Return $aRet[0] EndFunc Func SafeArrayGetVartype( $pSafeArray, ByRef $vt ) Local $aRet = DllCall( "OleAut32.dll", "int", "SafeArrayGetVartype", "ptr", $pSafeArray, "ptr*", 0 ) If @error Then Return SetError(1,0,1) $vt = $aRet[2] Return $aRet[0] EndFunc ; #################################################################################################### ; ### ### ; ### COMUtils.au3 ### ; ### ### ; #################################################################################################### Func CoCreateInstance( $rclsid, $pUnkOuter, $ClsContext, $riid, ByRef $ppv ) Local $aRet = DllCall( "ole32.dll", "long", "CoCreateInstance", "struct*", $rclsid, "ptr", $pUnkOuter, "dword", $ClsContext, "struct*", $riid, "ptr*", 0 ) If @error Then Return SetError(1,0,1) $ppv = $aRet[5] Return $aRet[0] EndFunc ; Add these lines to a script to activate the error handler: ;Local $oComErrFunc = ObjEvent( "AutoIt.Error", "ComErrFunc" ) ;#forceref $oComErrFunc Func ComErrFunc( $oError ) ConsoleWrite( @ScriptName & "(" & $oError.scriptline & "): ==> COM Error intercepted!" & @CRLF & _ @TAB & "Err.number is: " & @TAB & @TAB & "0x" & Hex( $oError.number ) & @CRLF & _ @TAB & "Err.windescription:" & @TAB & $oError.windescription & _ @TAB & "Err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "Err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "Err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "Err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "Err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "Err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "Err.retcode is: " & @TAB & "0x" & Hex( $oError.retcode ) & @CRLF ) EndFunc ; Copied from "Hooking into the IDispatch interface" by monoceres ; https://www.autoitscript.com/forum/index.php?showtopic=107678 Func ReplaceVTableFuncPtr( $pVTable, $iOffset, $pNewFunc ) Local $pPointer = DllStructGetData( DllStructCreate( "ptr", $pVTable ), 1 ) + $iOffset, $PAGE_EXECUTE_READWRITE = 0x40 Local $pOldFunc = DllStructGetData( DllStructCreate( "ptr", $pPointer ), 1 ) ; Get the original function pointer in VTable Local $aRet = DllCall( "Kernel32.dll", "int", "VirtualProtect", "ptr", $pPointer, "long", @AutoItX64 ? 8 : 4, "dword", $PAGE_EXECUTE_READWRITE, "dword*", 0 ) ; Unprotect memory DllStructSetData( DllStructCreate( "ptr", $pPointer ), 1, $pNewFunc ) ; Replace function pointer in VTable with $pNewFunc function pointer DllCall( "Kernel32.dll", "int", "VirtualProtect", "ptr", $pPointer, "long", @AutoItX64 ? 8 : 4, "dword", $aRet[4], "dword*", 0 ) ; Protect memory Return $pOldFunc ; Return original function pointer EndFunc ; #################################################################################################### ; ### ### ; ### AccessingVariables.au3 ### ; ### ### ; #################################################################################################### Global $oAccVars_Object = AccVars_Init(), $hAccVars_MethodFunc ; --- The first part of the UDF creates $oAccVars_Object and implements method functions --- Func AccVars_Init() ; Three locals copied from "IUIAutomation MS framework automate chrome, FF, IE, ...." by junkew ; https://www.autoitscript.com/forum/index.php?showtopic=153520 Local $sCLSID_CUIAutomation = "{FF48DBA4-60EF-4201-AA87-54103EEF594E}" Local $sIID_IUIAutomation = "{30CBE57D-D9D0-452A-AB13-7AC5AC4825EE}" Local $stag_IUIAutomation = _ "AccVars_VariableToVariant01 hresult(variant*);" & _ "AccVars_VariableToVariant02 hresult(variant*;variant*);" ; Create AccVars object (Automation object) Local $oAccVars_Object = ObjCreateInterface( $sCLSID_CUIAutomation, $sIID_IUIAutomation, $stag_IUIAutomation ) If Not IsObj( $oAccVars_Object ) Then Return SetError(1,0,1) ; Replace original methods with AccVars_VariableToVariantXY methods Local $pVariableToVariant, $pAccessVariable = Ptr( $oAccVars_Object() ), $sFuncName, $sFuncParams = "ptr", $iOffset, $iPtrSize = @AutoItX64 ? 8 : 4 For $i = 1 To 2 $sFuncName = "AccVars_VariableToVariant" & StringFormat( "%02i", $i ) $sFuncParams &= ";ptr*" $iOffset = ( 3 + $i - 1 ) * $iPtrSize $pVariableToVariant = DllCallbackGetPtr( DllCallbackRegister( $sFuncName, "long", $sFuncParams ) ) ReplaceVTableFuncPtr( $pAccessVariable, $iOffset, $pVariableToVariant ) Next Return $oAccVars_Object EndFunc Func AccVars_VariableToVariant01( $pSelf, $pVariant01 ) $hAccVars_MethodFunc( $pVariant01 ) Return 0 ; $S_OK (COM constant) #forceref $pSelf EndFunc Func AccVars_VariableToVariant02( $pSelf, $pVariant01, $pVariant02 ) $hAccVars_MethodFunc( $pVariant01, $pVariant02 ) Return 0 ; $S_OK (COM constant) #forceref $pSelf EndFunc ; --- The last part of the UDF creates a set of easy to use functions to call the object methods --- Func AccessVariables01( $hAccVars_Method, ByRef $vVariable01 ) $hAccVars_MethodFunc = $hAccVars_Method $oAccVars_Object.AccVars_VariableToVariant01( $vVariable01 ) EndFunc Func AccessVariables02( $hAccVars_Method, ByRef $vVariable01, ByRef $vVariable02 ) $hAccVars_MethodFunc = $hAccVars_Method $oAccVars_Object.AccVars_VariableToVariant02( $vVariable01, $vVariable02 ) EndFunc ; #################################################################################################### ; ### ### ; ### AccVarsUtilities.au3 ### ; ### ### ; #################################################################################################### ; --- AccVars_ArrayToSafeArray --- ; The AutoIt array and the safearray are arrays of variants Func AccVars_ArrayToSafeArray( ByRef $aArray, ByRef $pSafeArray ) AccessVariables01( AccVars_ArrayToSafeArrayConvert, $aArray ) AccVars_ArrayToSafeArrayData( $pSafeArray ) EndFunc Func AccVars_ArrayToSafeArrayConvert( $pArray ) ; <<<< On function entry the native AutoIt array is converted to a safearray contained in a variant >>>> ; Get safearray pointer Local $pSafeArrayFromArray = DllStructGetData( DllStructCreate( "ptr", $pArray + 8 ), 1 ) Local $pSafeArray SafeArrayCopy( $pSafeArrayFromArray, $pSafeArray ) If @error Then Return SetError(1,0,0) AccVars_ArrayToSafeArrayData( $pSafeArray, 1 ) EndFunc Func AccVars_ArrayToSafeArrayData( ByRef $pSafeArray, $bSet = 0 ) Static $pStaticSafeArray If $bSet Then $pStaticSafeArray = $pSafeArray Else $pSafeArray = $pStaticSafeArray EndIf EndFunc ; --- AccVars_SafeArrayToArray --- ; The safearray and the AutoIt array are arrays of variants Func AccVars_SafeArrayToArray( ByRef $pSafeArray, ByRef $aArray ) AccessVariables02( AccVars_SafeArrayToArrayConvert, $pSafeArray, $aArray ) EndFunc Func AccVars_SafeArrayToArrayConvert( $pvSafeArray, $pArray ) ; --- Get safearray information --- ; $pvSafeArray is a variant that contains a pointer Local $pSafeArray = DllStructGetData( DllStructCreate( "ptr", $pvSafeArray + 8 ), 1 ) ; Array type Local $iVarType SafeArrayGetVartype( $pSafeArray, $iVarType ) Switch $iVarType Case $VT_I2, $VT_I4 ; Signed integers Case $VT_R4, $VT_R8 ; 4/8 bytes floats Case $VT_BSTR ; Basic string Case $VT_BOOL ; Boolean type Case $VT_UI4, $VT_UI8 ; 4/8 bytes unsigned integers Case $VT_VARIANT ; Variant data type Case $VT_UNKNOWN ; IUnknown pointer ; $pSafeArray is not compatible with a native AutoIt array ; Convert $pSafeArray to a compatible safearray in $pSafeArray2 Local $tSafeArray = DllStructCreate( $tagSAFEARRAY, $pSafeArray ) Local $tSafeArrayBound = DllStructCreate( $tagSAFEARRAYBOUND ) Local $iElements = DllStructGetData( $tSafeArray, "cElements" ) DllStructSetData( $tSafeArrayBound, "cElements", $iElements ) DllStructSetData( $tSafeArrayBound, "lLbound", DllStructGetData( $tSafeArray, "lLbound" ) ) Local $pSafeArray2 = SafeArrayCreate( $VT_VARIANT, 1, $tSafeArrayBound ), $pArrayData, $pArrayData2 SafeArrayAccessData( $pSafeArray2, $pArrayData2 ) SafeArrayAccessData( $pSafeArray, $pArrayData ) $iVarType = @AutoItX64 ? $VT_UI8 : $VT_UI4 Local $iVarSize = @AutoItX64 ? 24 : 16 Local $iPtrSize = @AutoItX64 ? 8 : 4 For $i = 0 To $iElements - 1 ; Set variant type and data DllStructSetData( DllStructCreate( "word", $pArrayData2 + $i * $iVarSize ), 1, $iVarType ) DllStructSetData( DllStructCreate( "uint_ptr", 8 + $pArrayData2 + $i * $iVarSize ), 1, DllStructGetData( DllStructCreate( "ptr", $pArrayData + $i * $iPtrSize ), 1 ) ) Next SafeArrayUnaccessData( $pSafeArray ) SafeArrayUnaccessData( $pSafeArray2 ) SafeArrayCopy( $pSafeArray2, $pSafeArray ) SafeArrayDestroy( $pSafeArray2 ) Case Else Return SetError(1,0,0) EndSwitch ; --- Set $pArray to match an array --- ; Set vt element to $VT_ARRAY + $iVarType DllStructSetData( DllStructCreate( "word", $pArray ), 1, $VT_ARRAY + $iVarType ) ; Set data element to safearray pointer DllStructSetData( DllStructCreate( "ptr", $pArray + 8 ), 1, $pSafeArray ) ; <<<< On function exit the safearray contained in a variant is converted to a native AutoIt array >>>> EndFunc ; --- AccVars_ArrayToSafeArrayOfVartype --- ; The returned safearray is an array of the specified variant type Func AccVars_ArrayToSafeArrayOfVartype( ByRef $aArray, $iVartype ) Local $tsaBound = DllStructCreate( $tagSAFEARRAYBOUND ), $pSafeArray, $pSafeArrayData, $iArray = UBound( $aArray ), $iPtrSize = @AutoItX64 ? 8 : 4 DllStructSetData( $tsaBound, "cElements", $iArray ) DllStructSetData( $tsaBound, "lLbound", 0 ) $pSafeArray = SafeArrayCreate( $iVartype, 1, $tsaBound ) SafeArrayAccessData( $pSafeArray, $pSafeArrayData ) For $i = 0 To $iArray - 1 DllStructSetData( DllStructCreate( "ptr", $pSafeArrayData + $iPtrSize * $i ), 1, SysAllocString( $aArray[$i] ) ) Next SafeArrayUnaccessData( $pSafeArray ) Return $pSafeArray EndFunc ; --- AccVars_SafeArrayToSafeArrayOfVariant --- ; Returns a safearray with one variant element ; The variant element contains the input safearray Func AccVars_SafeArrayToSafeArrayOfVariant( ByRef $pSafeArrayIn ) Local $iVartype, $tsaBound = DllStructCreate( $tagSAFEARRAYBOUND ), $pSafeArrayOut, $pSafeArrayOutData SafeArrayGetVartype( $pSafeArrayIn, $iVartype ) DllStructSetData( $tsaBound, "cElements", 1 ) DllStructSetData( $tsaBound, "lLbound", 0 ) $pSafeArrayOut = SafeArrayCreate( $VT_VARIANT, 1, $tsaBound ) SafeArrayAccessData( $pSafeArrayOut, $pSafeArrayOutData ) DllStructSetData( DllStructCreate( "word", $pSafeArrayOutData ), 1, $iVartype + $VT_ARRAY ) DllStructSetData( DllStructCreate( "ptr", $pSafeArrayOutData + 8 ), 1, $pSafeArrayIn ) SafeArrayUnaccessData( $pSafeArrayOut ) Return $pSafeArrayOut EndFunc ; --- AccVars_VariantToVariable --- Func AccVars_VariantToVariable( ByRef $pVariant ) Switch DllStructGetData( DllStructCreate( "word", $pVariant ), 1 ) Case $VT_I4, $VT_I8 ; 4/8 bytes signed integer Return DllStructGetData( DllStructCreate( "int", $pVariant + 8 ), 1 ) Case $VT_R8 ; 8 bytes double Return DllStructGetData( DllStructCreate( "double", $pVariant + 8 ), 1 ) Case $VT_BSTR ; Basic string Return SysReadString( DllStructGetData( DllStructCreate( "ptr", $pVariant + 8 ), 1 ) ) Case $VT_BOOL ; 2 bytes boolean Return DllStructGetData( DllStructCreate( "short", $pVariant + 8 ), 1 ) Case $VT_UI4, $VT_UI8 ; 4/8 bytes unsigned integer Return DllStructGetData( DllStructCreate( "ptr", $pVariant + 8 ), 1 ) Case Else Return SetError(1,0,0) EndSwitch EndFunc ; --- AccVars_VariableToVariant --- Func AccVars_VariableToVariant( $vVariable, ByRef $pVariant ) Switch VarGetType( $vVariable ) Case "Bool" DllStructSetData( DllStructCreate( "word", $pVariant ), 1, $VT_BOOL ) DllStructSetData( DllStructCreate( "short", $pVariant + 8 ), 1, $vVariable ) Case "Double" DllStructSetData( DllStructCreate( "word", $pVariant ), 1, $VT_R8 ) DllStructSetData( DllStructCreate( "double", $pVariant + 8 ), 1, $vVariable ) Case "Int32" DllStructSetData( DllStructCreate( "word", $pVariant ), 1, $VT_I4 ) DllStructSetData( DllStructCreate( "int", $pVariant + 8 ), 1, $vVariable ) Case "Ptr" DllStructSetData( DllStructCreate( "word", $pVariant ), 1, @AutoItX64 ? $VT_UI8 : $VT_UI4 ) DllStructSetData( DllStructCreate( "ptr", $pVariant + 8 ), 1, $vVariable ) Case "String" DllStructSetData( DllStructCreate( "word", $pVariant ), 1, $VT_BSTR ) DllStructSetData( DllStructCreate( "ptr", $pVariant + 8 ), 1, SysAllocString( $vVariable ) ) Case Else Return SetError(1,0,0) EndSwitch EndFunc ; #################################################################################################### ; ### ### ; ### Interfaces.au3 ### ; ### ### ; #################################################################################################### Global Const $sCLSID_CorRuntimeHost = "{CB2F6723-AB3A-11D2-9C40-00C04FA30A3E}" Global Const $tCLSID_CorRuntimeHost = CLSIDFromString( $sCLSID_CorRuntimeHost ) Global Const $sIID_ICorRuntimeHost = "{CB2F6722-AB3A-11D2-9C40-00C04FA30A3E}" Global Const $tIID_ICorRuntimeHost = CLSIDFromString( $sIID_ICorRuntimeHost ) Global Const $sTag_ICorRuntimeHost = _ "CreateLogicalThreadState hresult();" & _ "DeleteLogicalThreadState hresult();" & _ "SwitchInLogicalThreadState hresult();" & _ "SwitchOutLogicalThreadState hresult();" & _ "LocksHeldByLogicalThread hresult();" & _ "MapFile hresult();" & _ "GetConfiguration hresult();" & _ "Start hresult();" & _ "Stop hresult();" & _ "CreateDomain hresult();" & _ "GetDefaultDomain hresult(ptr*);" & _ "EnumDomains hresult(ptr*);" & _ "NextDomain hresult(ptr;ptr*);" & _ "CloseEnum hresult();" & _ "CreateDomainEx hresult();" & _ "CreateDomainSetup hresult();" & _ "CreateEvidence hresult();" & _ "UnloadDomain hresult(ptr);" & _ "CurrentDomain hresult();" Global Const $sIID_IDispatch = "{00020400-0000-0000-C000-000000000046}" Global Const $sTag_IDispatch = _ "GetTypeInfoCount hresult(dword*);" & _ "GetTypeInfo hresult(dword;dword;ptr*);" & _ "GetIDsOfNames hresult(ptr;ptr;dword;dword;ptr);" & _ "Invoke hresult(dword;ptr;dword;word;ptr;ptr;ptr;ptr);" ; The interfaces _AppDomain, _Type and _Assembly below that starts with ; an underscore are the interfaces that can be used from unmanaged code. Global Const $sIID__AppDomain = "{05F696DC-2B29-3663-AD8B-C4389CF2A713}" Global Const $sTag__AppDomain = _ $sTag_IDispatch & _ "get_ToString hresult();" & _ "Equals hresult();" & _ "GetHashCode hresult();" & _ "GetType hresult(ptr*);" & _ "InitializeLifetimeService hresult();" & _ "GetLifetimeService hresult();" & _ "get_Evidence hresult();" & _ "add_DomainUnload hresult();" & _ "remove_DomainUnload hresult();" & _ "add_AssemblyLoad hresult();" & _ "remove_AssemblyLoad hresult();" & _ "add_ProcessExit hresult();" & _ "remove_ProcessExit hresult();" & _ "add_TypeResolve hresult();" & _ "remove_TypeResolve hresult();" & _ "add_ResourceResolve hresult();" & _ "remove_ResourceResolve hresult();" & _ "add_AssemblyResolve hresult();" & _ "remove_AssemblyResolve hresult();" & _ "add_UnhandledException hresult();" & _ "remove_UnhandledException hresult();" & _ "DefineDynamicAssembly hresult();" & _ "DefineDynamicAssembly_2 hresult();" & _ "DefineDynamicAssembly_3 hresult();" & _ "DefineDynamicAssembly_4 hresult();" & _ "DefineDynamicAssembly_5 hresult();" & _ "DefineDynamicAssembly_6 hresult();" & _ "DefineDynamicAssembly_7 hresult();" & _ "DefineDynamicAssembly_8 hresult();" & _ "DefineDynamicAssembly_9 hresult();" & _ "CreateInstance hresult(bstr;bstr;object*);" & _ "CreateInstanceFrom hresult();" & _ "CreateInstance_2 hresult();" & _ "CreateInstanceFrom_2 hresult();" & _ "CreateInstance_3 hresult(bstr;bstr;bool;int;ptr;ptr;ptr;ptr;ptr;ptr*);" & _ "CreateInstanceFrom_3 hresult();" & _ "Load hresult();" & _ "Load_2 hresult();" & _ "Load_3 hresult();" & _ "Load_4 hresult();" & _ "Load_5 hresult();" & _ "Load_6 hresult();" & _ "Load_7 hresult();" & _ "ExecuteAssembly hresult();" & _ "ExecuteAssembly_2 hresult();" & _ "ExecuteAssembly_3 hresult();" & _ "get_FriendlyName hresult(bstr*);" & _ "get_BaseDirectory hresult(bstr*);" & _ "get_RelativeSearchPath hresult();" & _ "get_ShadowCopyFiles hresult();" & _ "GetAssemblies hresult(ptr*);" & _ "AppendPrivatePath hresult();" & _ "ClearPrivatePath ) = 0; hresult();" & _ "SetShadowCopyPath hresult();" & _ "ClearShadowCopyPath ) = 0; hresult();" & _ "SetCachePath hresult();" & _ "SetData hresult();" & _ "GetData hresult();" & _ "SetAppDomainPolicy hresult();" & _ "SetThreadPrincipal hresult();" & _ "SetPrincipalPolicy hresult();" & _ "DoCallBack hresult();" & _ "get_DynamicDirectory hresult();" Global Const $sIID__Type = "{BCA8B44D-AAD6-3A86-8AB7-03349F4F2DA2}" Global Const $sTag__Type = _ $sTag_IDispatch & _ "get_ToString hresult(bstr*);" & _ "Equals hresult(variant;short*);" & _ "GetHashCode hresult(int*);" & _ "GetType hresult(ptr);" & _ "get_MemberType hresult(ptr);" & _ "get_name hresult(bstr*);" & _ "get_DeclaringType hresult(ptr);" & _ "get_ReflectedType hresult(ptr);" & _ "GetCustomAttributes hresult(ptr;short;ptr);" & _ "GetCustomAttributes_2 hresult(short;ptr);" & _ "IsDefined hresult(ptr;short;short*);" & _ "get_Guid hresult(ptr);" & _ "get_Module hresult(ptr);" & _ "get_Assembly hresult(ptr*);" & _ "get_TypeHandle hresult(ptr);" & _ "get_FullName hresult(bstr*);" & _ "get_Namespace hresult(bstr*);" & _ "get_AssemblyQualifiedName hresult(bstr*);" & _ "GetArrayRank hresult(int*);" & _ "get_BaseType hresult(ptr);" & _ "GetConstructors hresult(ptr;ptr);" & _ "GetInterface hresult(bstr;short;ptr);" & _ "GetInterfaces hresult(ptr);" & _ "FindInterfaces hresult(ptr;variant;ptr);" & _ "GetEvent hresult(bstr;ptr;ptr);" & _ "GetEvents hresult(ptr);" & _ "GetEvents_2 hresult(int;ptr);" & _ "GetNestedTypes hresult(int;ptr);" & _ "GetNestedType hresult(bstr;ptr;ptr);" & _ "GetMember hresult(bstr;ptr;ptr;ptr);" & _ "GetDefaultMembers hresult(ptr);" & _ "FindMembers hresult(ptr;ptr;ptr;variant;ptr);" & _ "GetElementType hresult(ptr);" & _ "IsSubclassOf hresult(ptr;short*);" & _ "IsInstanceOfType hresult(variant;short*);" & _ "IsAssignableFrom hresult(ptr;short*);" & _ "GetInterfaceMap hresult(ptr;ptr);" & _ "GetMethod hresult(bstr;ptr;ptr;ptr;ptr;ptr);" & _ "GetMethod_2 hresult(bstr;ptr;ptr);" & _ "GetMethods hresult(int;ptr);" & _ "GetField hresult(bstr;ptr;ptr);" & _ "GetFields hresult(int;ptr);" & _ "GetProperty hresult(bstr;ptr;ptr);" & _ "GetProperty_2 hresult(bstr;ptr;ptr;ptr;ptr;ptr;ptr);" & _ "GetProperties hresult(ptr;ptr);" & _ "GetMember_2 hresult(bstr;ptr;ptr);" & _ "GetMembers hresult(int;ptr*);" & _ "InvokeMember hresult(bstr;ptr;ptr;variant;ptr;ptr;ptr;ptr;variant*);" & _ "get_UnderlyingSystemType hresult(ptr);" & _ "InvokeMember_2 hresult(bstr;int;ptr;variant;ptr;ptr;variant*);" & _ "InvokeMember_3 hresult(bstr;int;ptr;variant;ptr;variant*);" & _ "GetConstructor hresult(ptr;ptr;ptr;ptr;ptr;ptr);" & _ "GetConstructor_2 hresult(ptr;ptr;ptr;ptr;ptr);" & _ "GetConstructor_3 hresult(ptr;ptr);" & _ "GetConstructors_2 hresult(ptr);" & _ "get_TypeInitializer hresult(ptr);" & _ "GetMethod_3 hresult(bstr;ptr;ptr;ptr;ptr;ptr;ptr);" & _ "GetMethod_4 hresult(bstr;ptr;ptr;ptr);" & _ "GetMethod_5 hresult(bstr;ptr;ptr);" & _ "GetMethod_6 hresult(bstr;ptr);" & _ "GetMethods_2 hresult(ptr);" & _ "GetField_2 hresult(bstr;ptr);" & _ "GetFields_2 hresult(ptr);" & _ "GetInterface_2 hresult(bstr;ptr);" & _ "GetEvent_2 hresult(bstr;ptr);" & _ "GetProperty_3 hresult(bstr;ptr;ptr;ptr;ptr);" & _ "GetProperty_4 hresult(bstr;ptr;ptr;ptr);" & _ "GetProperty_5 hresult(bstr;ptr;ptr);" & _ "GetProperty_6 hresult(bstr;ptr;ptr);" & _ "GetProperty_7 hresult(bstr;ptr);" & _ "GetProperties_2 hresult(ptr);" & _ "GetNestedTypes_2 hresult(ptr);" & _ "GetNestedType_2 hresult(bstr;ptr);" & _ "GetMember_3 hresult(bstr;ptr);" & _ "GetMembers_2 hresult(ptr);" & _ "get_Attributes hresult(ptr);" & _ "get_IsNotPublic hresult(short*);" & _ "get_IsPublic hresult(short*);" & _ "get_IsNestedPublic hresult(short*);" & _ "get_IsNestedPrivate hresult(short*);" & _ "get_IsNestedFamily hresult(short*);" & _ "get_IsNestedAssembly hresult(short*);" & _ "get_IsNestedFamANDAssem hresult(short*);" & _ "get_IsNestedFamORAssem hresult(short*);" & _ "get_IsAutoLayout hresult(short*);" & _ "get_IsLayoutSequential hresult(short*);" & _ "get_IsExplicitLayout hresult(short*);" & _ "get_IsClass hresult(short*);" & _ "get_IsInterface hresult(short*);" & _ "get_IsValueType hresult(short*);" & _ "get_IsAbstract hresult(short*);" & _ "get_IsSealed hresult(short*);" & _ "get_IsEnum hresult(short*);" & _ "get_IsSpecialName hresult(short*);" & _ "get_IsImport hresult(short*);" & _ "get_IsSerializable hresult(short*);" & _ "get_IsAnsiClass hresult(short*);" & _ "get_IsUnicodeClass hresult(short*);" & _ "get_IsAutoClass hresult(short*);" & _ "get_IsArray hresult(short*);" & _ "get_IsByRef hresult(short*);" & _ "get_IsPointer hresult(short*);" & _ "get_IsPrimitive hresult(short*);" & _ "get_IsCOMObject hresult(short*);" & _ "get_HasElementType hresult(short*);" & _ "get_IsContextful hresult(short*);" & _ "get_IsMarshalByRef hresult(short*);" & _ "Equals_2 hresult(ptr;short*);" ; Binding flags for InvokeMember, InvokeMember_2 ; and InvokeMember_3 methods of _Type interface. Global Const $BindingFlags_Default = 0x0000 Global Const $BindingFlags_IgnoreCase = 0x0001 Global Const $BindingFlags_DeclaredOnly = 0x0002 Global Const $BindingFlags_Instance = 0x0004 Global Const $BindingFlags_Static = 0x0008 Global Const $BindingFlags_Public = 0x0010 Global Const $BindingFlags_NonPublic = 0x0020 Global Const $BindingFlags_FlattenHierarchy = 0x0040 Global Const $BindingFlags_InvokeMethod = 0x0100 Global Const $BindingFlags_CreateInstance = 0x0200 Global Const $BindingFlags_GetField = 0x0400 Global Const $BindingFlags_SetField = 0x0800 Global Const $BindingFlags_GetProperty = 0x1000 Global Const $BindingFlags_SetProperty = 0x2000 Global Const $BindingFlags_PutDispProperty = 0x4000 Global Const $BindingFlags_PutRefDispProperty = 0x8000 Global Const $BindingFlags_ExactBinding = 0x00010000 Global Const $BindingFlags_SuppressChangeType = 0x00020000 Global Const $BindingFlags_OptionalParamBinding = 0x00040000 Global Const $BindingFlags_IgnoreReturn = 0x01000000 Global Const $BindingFlags_DefaultValue = $BindingFlags_Static + $BindingFlags_Public + $BindingFlags_FlattenHierarchy + $BindingFlags_InvokeMethod Global Const $sIID__Assembly = "{17156360-2F1A-384A-BC52-FDE93C215C5B}" Global Const $sTag__Assembly = _ $sTag_IDispatch & _ "get_ToString hresult(bstr*);" & _ "Equals hresult();" & _ "GetHashCode hresult();" & _ "GetType hresult(ptr*);" & _ "get_CodeBase hresult();" & _ "get_EscapedCodeBase hresult();" & _ "GetName hresult();" & _ "GetName_2 hresult();" & _ "get_FullName hresult(bstr*);" & _ "get_EntryPoint hresult();" & _ "GetType_2 hresult(bstr;ptr*);" & _ "GetType_3 hresult();" & _ "GetExportedTypes hresult();" & _ "GetTypes hresult(ptr*);" & _ "GetManifestResourceStream hresult();" & _ "GetManifestResourceStream_2 hresult();" & _ "GetFile hresult();" & _ "GetFiles hresult();" & _ "GetFiles_2 hresult();" & _ "GetManifestResourceNames hresult();" & _ "GetManifestResourceInfo hresult();" & _ "get_Location hresult(bstr*);" & _ "get_Evidence hresult();" & _ "GetCustomAttributes hresult();" & _ "GetCustomAttributes_2 hresult();" & _ "IsDefined hresult();" & _ "GetObjectData hresult();" & _ "add_ModuleResolve hresult();" & _ "remove_ModuleResolve hresult();" & _ "GetType_4 hresult();" & _ "GetSatelliteAssembly hresult();" & _ "GetSatelliteAssembly_2 hresult();" & _ "LoadModule hresult();" & _ "LoadModule_2 hresult();" & _ "CreateInstance hresult(bstr;variant*);" & _ "CreateInstance_2 hresult(bstr;bool;variant*);" & _ "CreateInstance_3 hresult(bstr;bool;int;ptr;ptr;ptr;ptr;variant*);" & _ "GetLoadedModules hresult();" & _ "GetLoadedModules_2 hresult();" & _ "GetModules hresult();" & _ "GetModules_2 hresult();" & _ "GetModule hresult();" & _ "GetReferencedAssemblies hresult();" & _ "get_GlobalAssemblyCache hresult(bool*);" Func CLSIDFromString( $sGUID ) Static $hOle32Dll = "ole32.dll", $tGUID = DllStructCreate( "ulong Data1;ushort Data2;ushort Data3;byte Data4[8]" ), $pGUID = DllStructGetPtr( $tGUID ) DllCall( $hOle32Dll, "uint", "CLSIDFromString", "wstr", $sGUID, "ptr", $pGUID ) Return $tGUID EndFunc Func GUIDFromStringEx( $sGUID, $tGUID ) Static $hOle32Dll = "ole32.dll" DllCall( $hOle32Dll, "long", "CLSIDFromString", "wstr", $sGUID, "struct*", $tGUID ) EndFunc ; #################################################################################################### ; ### ### ; ### DotNet.au3 ### ; ### ### ; #################################################################################################### Func DotNet_Start( $sVersion = "" ) Static $pRuntimeHost = 0, $oRuntimeHost If $pRuntimeHost Then Return $oRuntimeHost If $sVersion = "" Then Local $sPath = @WindowsDir & "\Microsoft.NET\Framework" & ( @AutoItX64 ? "64" : "" ) & "\" Local $hSearch = FileFindFirstFile( $sPath & "v?.*" ), $sFolder If $hSearch <> -1 Then While 1 $sFolder = FileFindNextFile( $hSearch ) Local $iError = @error, $iExtended = @extended If $iExtended = 1 And FileExists( $sPath & $sFolder & "\mscorlib.dll" ) And $sVersion < $sFolder Then $sVersion = $sFolder If $iError Then ExitLoop WEnd EndIf ElseIf Not FileExists( @WindowsDir & "\Microsoft.NET\Framework" & ( @AutoItX64 ? "64" : "" ) & "\" & $sVersion ) Then Return SetError( 1,0,0 ) EndIf Local Const $tagGUID = "struct; ulong Data1;ushort Data2;ushort Data3;byte Data4[8]; endstruct" Local $tCLSID_CorRuntimeHost = DllStructCreate( $tagGUID ) GUIDFromStringEx( $sCLSID_CorRuntimeHost, $tCLSID_CorRuntimeHost ) Local $tIID_ICorRuntimeHost = DllStructCreate( $tagGUID ) GUIDFromStringEx( $sIID_ICorRuntimeHost, $tIID_ICorRuntimeHost ) Local $aRet = DllCall( "MSCorEE.dll", "long", "CorBindToRuntimeEx", "wstr", $sVersion, "ptr", NULL, "dword", 0, _ "struct*", $tCLSID_CorRuntimeHost, "struct*", $tIID_ICorRuntimeHost, "ptr*", 0 ) If Not ( @error = 0 And $aRet[0] = 0 And $aRet[6] ) Then Return SetError( 1,0,0 ) $pRuntimeHost = $aRet[6] $oRuntimeHost = ObjCreateInterface( $pRuntimeHost, $sIID_ICorRuntimeHost, $sTag_ICorRuntimeHost ) Return $oRuntimeHost EndFunc Func DotNet_StartDomain( ByRef $oAppDomain, $sFriendlyName = "", $sBaseDirectory = "" ) Local $oDefDomain = DotNet_GetDefaultDomain() Local $pType, $oType $oDefDomain.GetType( $pType ) $oType = ObjCreateInterface( $pType, $sIID__Type, $sTag__Type ) Local $psaEmpty = SafeArrayCreateEmpty( $VT_VARIANT ) Local $aArguments[5], $pSafeArray $aArguments[0] = $sFriendlyName $aArguments[2] = $sBaseDirectory $aArguments[4] = False AccVars_ArrayToSafeArray( $aArguments, $pSafeArray ) $oType.InvokeMember_3( "CreateDomain", $BindingFlags_DefaultValue, $psaEmpty, $psaEmpty, $pSafeArray, $oAppDomain ) EndFunc Func DotNet_StopDomain( ByRef $oAppDomain ) Local $oRuntimeHost = DotNet_Start() $oRuntimeHost.UnloadDomain( Ptr( $oAppDomain ) ) $oAppDomain = 0 EndFunc ; Internal function Func DotNet_GetDefaultDomain() Static $pDefDomain = 0, $oDefDomain If $pDefDomain Then Return $oDefDomain Local $oRuntimeHost = DotNet_Start() $oRuntimeHost.Start() $oRuntimeHost.GetDefaultDomain( $pDefDomain ) $oDefDomain = ObjCreateInterface( $pDefDomain, $sIID__AppDomain, $sTag__AppDomain ) Return $oDefDomain EndFunc Func DotNet_LoadAssembly( $sAssemblyName, $oAppDomain = 0 ) If Not $oAppDomain Then $oAppDomain = DotNet_GetDefaultDomain() Local $pType, $oType $oAppDomain.GetType( $pType ) $oType = ObjCreateInterface( $pType, $sIID__Type, $sTag__Type ) Local $pAssembly, $oAssembly $oType.get_Assembly( $pAssembly ) $oAssembly = ObjCreateInterface( $pAssembly, $sIID__Assembly, $sTag__Assembly ) Local $pAssemblyType, $oAssemblyType $oAssembly.GetType( $pAssemblyType ) $oAssemblyType = ObjCreateInterface( $pAssemblyType, $sIID__Type, $sTag__Type ) Local $aAssemblyName = [ $sAssemblyName ], $pSafeArray AccVars_ArrayToSafeArray( $aAssemblyName, $pSafeArray ) Local $pNetCode $oAssemblyType.InvokeMember_3( "LoadFrom", $BindingFlags_DefaultValue, 0, 0, $pSafeArray, $pNetCode ) ; We first try to load the .NET assembly with the LoadFrom method ; If LoadFrom method fails, we try to load the .NET assembly using the LoadWithPartialName method If Not Ptr( $pNetCode ) Then Local $iPos = StringInStr( $sAssemblyName, ".", Default, -1 ) If StringRight( $sAssemblyName, StringLen( $sAssemblyName ) - $iPos ) = "dll" Then _ ; Use name of .NET assembly without DLL- $sAssemblyName = StringLeft( $sAssemblyName, $iPos - 1 ) ; extension in LoadWithPartialName method. $aAssemblyName[0] = $sAssemblyName AccVars_ArrayToSafeArray( $aAssemblyName, $pSafeArray ) $oAssemblyType.InvokeMember_3( "LoadWithPartialName", $BindingFlags_DefaultValue, 0, 0, $pSafeArray, $pNetCode ) ; LoadWithPartialName searches for the .NET assembly in the path given by $sBaseDirectory in DotNet_StartDomain EndIf If Not Ptr( $pNetCode ) Then Return SetError( 2,0,0 ) Return ObjCreateInterface( $pNetCode, $sIID__Assembly, $sTag__Assembly ) EndFunc Func DotNet_LoadCScode( $sCode, $sReferences = "", $oAppDomain = 0, $sFileName = "", $sCompilerOptions = "" ) Local $oNetCode = DotNet_LoadCode( $sCode, $sReferences, "System", "Microsoft.CSharp.CSharpCodeProvider", $oAppDomain, $sFileName, $sCompilerOptions ) If @error Then Return SetError( @error,0,0 ) Return $oNetCode EndFunc Func DotNet_LoadVBcode( $sCode, $sReferences = "", $oAppDomain = 0, $sFileName = "", $sCompilerOptions = "" ) Local $oNetCode = DotNet_LoadCode( $sCode, $sReferences, "System", "Microsoft.VisualBasic.VBCodeProvider", $oAppDomain, $sFileName, $sCompilerOptions ) If @error Then Return SetError( @error,0,0 ) Return $oNetCode EndFunc ; Internal function Func DotNet_LoadCode( $sCode, $sReferences, $sProviderAssembly, $sProviderType, $oAppDomain = 0, $sFileName = "", $sCompilerOptions = "" ) If Not $oAppDomain Then $oAppDomain = DotNet_GetDefaultDomain() Local $oAsmProvider, $oCodeProvider, $oCodeCompiler, $oAsmSystem, $oPrms If IsObj( $oAppDomain ) Then $oAsmProvider = DotNet_LoadAssembly( $sProviderAssembly, $oAppDomain ) If IsObj( $oAsmProvider ) Then $oAsmProvider.CreateInstance( $sProviderType, $oCodeProvider ) If IsObj( $oCodeProvider ) Then $oCodeCompiler = $oCodeProvider.CreateCompiler() If IsObj( $oCodeCompiler ) Then $oAsmSystem = $sProviderAssembly = "System" ? $oAsmProvider : DotNet_LoadAssembly( "System", $oAppDomain ) If Not IsObj( $oAsmSystem ) Then Return SetError( 3,0,0 ) Local $aReferences = StringSplit( StringStripWS( StringRegExpReplace( $sReferences, "\s*\|\s*", "|" ), 3 ), "|", 2 ) ; 3 = $STR_STRIPLEADING + $STR_STRIPTRAILING, 2 = $STR_NOCOUNT Local $pSafeArray = AccVars_ArrayToSafeArrayOfVartype( $aReferences, $VT_BSTR ) Local $psaVariant = AccVars_SafeArrayToSafeArrayOfVariant( $pSafeArray ) Local $psaEmpty = SafeArrayCreateEmpty( $VT_VARIANT ) ; Create $oPrms object $oAsmSystem.CreateInstance_3( "System.CodeDom.Compiler.CompilerParameters", True, 0, 0, $psaVariant, 0, $psaEmpty, $oPrms ) If Not IsObj( $oPrms ) Then Return SetError( 4,0,0 ) ; Set parameters for compiler $oPrms.OutputAssembly = $sFileName $oPrms.GenerateInMemory = ( $sFileName = "" ) $oPrms.GenerateExecutable = ( StringRight( $sFileName, 4 ) = ".exe" ) $oPrms.CompilerOptions = $sCompilerOptions $oPrms.IncludeDebugInformation = True ; Compile code Local $oCompilerRes = $oCodeCompiler.CompileAssemblyFromSource( $oPrms, $sCode ) ; Compiler errors? If $oCompilerRes.Errors.Count() Then Local $b = False For $err In $oCompilerRes.Errors If $b Then ConsoleWrite( @CRLF ) ConsoleWrite( "Line: " & $err.Line & @CRLF & "Column: " & $err.Column & @CRLF & $err.ErrorNumber & ": " & $err.ErrorText & @CRLF ) $b = True Next Return SetError( 5,0,0 ) EndIf If $sFileName Then Return $oCompilerRes.PathToAssembly() Else Local $pNetCode = $oCompilerRes.CompiledAssembly() Return ObjCreateInterface( $pNetCode, $sIID__Assembly, $sTag__Assembly ) EndIf EndFunc Func DotNet_CreateObject( ByRef $oNetCode, $sClassName, $v3 = Default, $v4 = Default, $v5 = Default, $v6 = Default, $v7 = Default, $v8 = Default, $v9 = Default ) Local $aParams = [ $v3, $v4, $v5, $v6, $v7, $v8, $v9 ], $oObject = 0 If @NumParams = 2 Then $oNetCode.CreateInstance_2( $sClassName, True, $oObject ) Return $oObject EndIf Local $iArgs = @NumParams - 2, $aArgs[$iArgs], $pSafeArray For $i = 0 To $iArgs - 1 $aArgs[$i] = $aParams[$i] Next AccVars_ArrayToSafeArray( $aArgs, $pSafeArray ) Local $psaEmpty = SafeArrayCreateEmpty( $VT_VARIANT ) $oNetCode.CreateInstance_3( $sClassName, True, 0, 0, $pSafeArray, 0, $psaEmpty, $oObject ) Return $oObject EndFunc ; #################################################################################################### ; ### ### ; ### DotNetUtils.au3 ### ; ### ### ; #################################################################################################### #include <Array.au3> Func DotNet_ListDomains() Local $pEnum, $pDomain, $oDomain Local $aDomains[100][2], $iDomains = 0 Local $oRuntimeHost = DotNet_Start() $oRuntimeHost.EnumDomains( $pEnum ) While Not $oRuntimeHost.NextDomain( $pEnum, $pDomain ) $oDomain = ObjCreateInterface( $pDomain, $sIID__AppDomain, $sTag__AppDomain ) $oDomain.get_FriendlyName( $aDomains[$iDomains][0] ) $oDomain.get_BaseDirectory( $aDomains[$iDomains][1] ) $iDomains += 1 WEnd ReDim $aDomains[$iDomains][2] Return $aDomains EndFunc Func DotNet_ListDomainsEx() Local $aDomains = DotNet_ListDomains() _ArrayDisplay( $aDomains, ".NET Framework Domains", "", 0, Default, "Friendly Name|Base Directory to load assemblies" ) EndFunc Func DotNet_ListAssemblies( $oAppDomain = 0 ) Local $pAssemblies, $aAssemblies If Not $oAppDomain Then _ $oAppDomain = DotNet_GetDefaultDomain() $oAppDomain.getAssemblies( $pAssemblies ) AccVars_SafeArrayToArray( $pAssemblies, $aAssemblies ) Local $nAsms = UBound( $aAssemblies ), $aAsmInfo[$nAsms][3], $oAssembly For $i = 0 To $nAsms - 1 $oAssembly = ObjCreateInterface( $aAssemblies[$i], $sIID__Assembly, $sTag__Assembly ) $oAssembly.get_GlobalAssemblyCache( $aAsmInfo[$i][0] ) $oAssembly.get_FullName( $aAsmInfo[$i][1] ) $oAssembly.get_Location( $aAsmInfo[$i][2] ) Next Return $aAsmInfo EndFunc Func DotNet_ListAssembliesEx( $oAppDomain = 0 ) Local $aAssemblies = DotNet_ListAssemblies( $oAppDomain ) _ArrayDisplay( $aAssemblies, "Loaded Assemblies in Domain", "", 0, Default, "GAC|Assembly Full Name|Assembly Location" ) EndFunc
43.920899
237
0.615538
c569653a3d1c9737088fadfa2ffdb49f2d3b8d0a
1,231
au3
AutoIt
windows-dependencies/autoit/Examples/Helpfile/_Date_Time_SetSystemTimeAdjustment.au3
OakNinja/dataloader
145ad92e72d17db897f7293c608dc35dec109cc5
[ "BSD-3-Clause" ]
1
2016-08-30T09:16:50.000Z
2016-08-30T09:16:50.000Z
windows-dependencies/autoit/Examples/Helpfile/_Date_Time_SetSystemTimeAdjustment.au3
OakNinja/dataloader
145ad92e72d17db897f7293c608dc35dec109cc5
[ "BSD-3-Clause" ]
1
2020-08-30T09:33:02.000Z
2020-08-30T09:33:02.000Z
windows-dependencies/autoit/Examples/Helpfile/_Date_Time_SetSystemTimeAdjustment.au3
OakNinja/dataloader
145ad92e72d17db897f7293c608dc35dec109cc5
[ "BSD-3-Clause" ]
1
2021-07-27T06:05:48.000Z
2021-07-27T06:05:48.000Z
#include <Date.au3> #include <WinAPI.au3> ; Under Vista the Windows API "SetSystemTimeAdjustment" may be rejected due to system security _Main() Func _Main() Local $aInfo ; Open the clock so we can watch the fun Run("RunDll32.exe shell32.dll,Control_RunDLL timedate.cpl") WinWaitActive("[CLASS:#32770]") ; Get current time adjustments $aInfo = _Date_Time_GetSystemTimeAdjustment() ; Slow down clock If Not _Date_Time_SetSystemTimeAdjustment($aInfo[1] / 10, False) Then MsgBox(4096, "Error", "System clock cannot be DOWN" & @CRLF & @CRLF & _WinAPI_GetLastErrorMessage()) Exit EndIf MsgBox(4096, "Information", "Slowing down system clock", 2) Sleep(5000) ; Speed up clock If Not _Date_Time_SetSystemTimeAdjustment($aInfo[1] * 10, False) Then MsgBox(4096, "Error", "System clock cannot be UP" & @CRLF & @CRLF & _WinAPI_GetLastErrorMessage()) EndIf MsgBox(4096, "Information", "Speeding up system clock", 2) Sleep(5000) ; Reset time adjustment If Not _Date_Time_SetSystemTimeAdjustment($aInfo[1], True) Then MsgBox(4096, "Error", "System clock cannot be RESET" & @CRLF & @CRLF & _WinAPI_GetLastErrorMessage()) Else MsgBox(4096, "Information", "System clock restored") EndIf EndFunc ;==>_Main
28.627907
103
0.735175
0e47f3249c682cecb2eb6c609056caf3b08d52dd
2,542
awk
Awk
nvim/bundle/vimpager/prototypes/uudecode_gawk.awk
a8r5o/mac_solarized
1e068c572f99d20b226a51a89641b5d8a27db232
[ "MIT" ]
3
2015-03-31T18:36:18.000Z
2019-03-28T00:39:12.000Z
nvim/bundle/vimpager/prototypes/uudecode_gawk.awk
a8r5o/mac_solarized
1e068c572f99d20b226a51a89641b5d8a27db232
[ "MIT" ]
null
null
null
nvim/bundle/vimpager/prototypes/uudecode_gawk.awk
a8r5o/mac_solarized
1e068c572f99d20b226a51a89641b5d8a27db232
[ "MIT" ]
1
2015-12-11T10:23:48.000Z
2015-12-11T10:23:48.000Z
#!/bin/sh # uudecode in GNU awk (and some others, like OpenBSD) decodes stdin to stdout # # Copyright (c) 2015, Rafael Kitover <rkitover@gmail.com> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. awk=awk if command -v gawk >/dev/null; then awk=gawk fi $awk ' BEGIN { charset=" !\"#$%&'\''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"; } function charval(char) { return index(charset, char) + 32 - 1; } /^begin / { next } /^end$/ { exit } { cnt = substr($0, 1, 1); if (cnt == "`") next; cnt = charval(cnt) - 32; enc = substr($0, 2, length($0) - 1); chars = 0; pos = 1; while (chars < cnt) { grp = substr(enc, pos, 4); gsub(/`/, " ", grp); # zero bytes c1 = charval(substr(grp, 1, 1)) - 32; c2 = charval(substr(grp, 2, 1)) - 32; c3 = charval(substr(grp, 3, 1)) - 32; c4 = charval(substr(grp, 4, 1)) - 32; chars_bits = or(c4, or(or(lshift(c3, 6), lshift(c2, 12)), lshift(c1, 18))); char[1] = sprintf("%c", rshift(and(chars_bits, 16711680), 16)); char[2] = sprintf("%c", rshift(and(chars_bits, 65280), 8)); char[3] = sprintf("%c", and(chars_bits, 255)); for (i = 1; i <= 3 && chars < cnt; i++) { printf("%s", char[i]); chars++; } pos += 4; } } '
31.382716
84
0.641621
fa6e4e7dc0fb3996290852caacc0de2f233c7b20
740
awk
Awk
src/bio/vcf/vep/vep2tabular.awk
lindenb/awk-sandbox
4762203e812e7f3fec538b3d8af6749cf3d9637e
[ "Apache-2.0" ]
1
2016-01-14T23:30:49.000Z
2016-01-14T23:30:49.000Z
src/bio/vcf/vep/vep2tabular.awk
lindenb/awk-sandbox
4762203e812e7f3fec538b3d8af6749cf3d9637e
[ "Apache-2.0" ]
null
null
null
src/bio/vcf/vep/vep2tabular.awk
lindenb/awk-sandbox
4762203e812e7f3fec538b3d8af6749cf3d9637e
[ "Apache-2.0" ]
1
2018-09-01T21:37:30.000Z
2018-09-01T21:37:30.000Z
## shows the VEP annotations in a VCF BEGIN { FS=" "; } /^##INFO=<ID=CSQ,/ { i= index($0,"Format: "); header= substr($0,i+8); i= index(header,"\""); header= substr(header,1,i-1); ncols = split(header,columns,"|"); next; } /^#CHROM/ { printf("#CHROM\tPOS\tID"); for(i=1;i<=ncols;++i) printf("\t%s",columns[i]); printf("\n"); next; } /^#/ { next; } { ninfo = split($8,info,";"); for(i=1;i<= ninfo;++i) { if(substr(info[i],1,4) != "CSQ=") continue; info[i] = substr(info[i],5); ncsq = split(info[i],csq,","); for(j=1; j<= ncsq; ++j) { ntokens = split(csq[j],tokens,"|"); printf("%s\t%s\t%s",$1,$2,$3); for(k=1;k<=ntokens;++k) printf("\t%s",(tokens[k]==""?".":tokens[k])); printf("\n"); } } }
20
72
0.506757
e2d08a342b9ec73f262c0971522372fc7e51b0e9
20,308
awk
Awk
source/pkgsrc/mk/scripts/genreadme.awk
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/mk/scripts/genreadme.awk
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/mk/scripts/genreadme.awk
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
#!/usr/bin/awk -f # $NetBSD: genreadme.awk,v 1.49 2021/04/05 10:32:38 nia Exp $ # # Copyright (c) 2002-2021 The NetBSD Foundation, Inc. # All rights reserved. # # This code is derived from software contributed to The NetBSD Foundation # by Dan McMahill. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # Global variables #----------------- # The following associative arrays are used for storing the dependency # information and other information for the packages # # depends[] : index=pkgdir (math/scilab) # List of explicitly listed depencencies by name. # I.e. "xless-[0-9]* pvm-3.4.3" # # builddepends[] : index=pkgdir (math/scilab) # List of explicitly listed depencencies by name. # BEGIN { do_pkg_readme=1; printf("Reading database file\n"); } #conflicts /usr/pkgsrc/math/scilab #depends /usr/pkgsrc/math/scilab xless-[0-9]*:../../x11/xless pvm-3.4.3:../../parallel/pvm3 # /^(build_|tool_)?depends / { # # Read in the entire depends tree # These lines look like: # #depends /usr/pkgsrc/math/scilab xless-[0-9]*:../../x11/xless pvm-3.4.3:../../parallel/pvm3 #build_depends /usr/pkgsrc/math/scilab libtool-base>=1.4.20010614nb9:../../devel/libtool-base # deptype=$1; # pkg=fulldir2pkgdir($2); pkg = $2; if (pkg in depends) {} else {depends[pkg] = "";} if (pkg in builddepends) {} else {builddepends[pkg] = "";} for (i = 3; i <= NF; i++) { split($i, a,":"); pkgpat = a[1]; pkgdir = a[2]; sub(/[\.\/]*/, "", pkgdir); if (pkgdir !~ /\//) { pkgcat = pkg; gsub(/\/.*/, "", pkgcat); pkgdir=pkgcat "/" pkgdir; if (debug) printf("Corrected missing category directory to get \"%s\"\n", pkgdir); } if (debug){ printf("package in directory %s %s on:\n", pkg, deptype); printf("\tpkgpat = %s\n", pkgpat); printf("\tpkgdir = %s\n", pkgdir); } # # store the package directory in a associative array with the wildcard # pattern as the index since we will need to be able to look this up later # pat2dir[pkgpat] = pkgdir; if (deptype == "depends") { depends[pkg] = depends[pkg] " " pkgpat " " ; if (debug) { printf("Appending %s to depends[%s] (%s)\n", pkgpat, pkg, depends[pkg]); } } else { if (debug) { printf("Appending %s to builddepends[%s] (%s)\n", pkgpat, pkg, builddepends[pkg]); } builddepends[pkg] = builddepends[pkg] " " pkgpat " " ; } } next; } /^maintainer /{ maintainer[$2] = $3; gsub(/@/, " AT ", maintainer[$2]); next; } /^comment /{ dir = $2; gsub(/^comment[ \t]*/, ""); tmp = substr($0, length($1) + 1); gsub(/^[ \t]*/, "", tmp); gsub(/&/, "\\\\\\&amp;", tmp); comment[dir] = tmp; next; } /^homepage /{ homepage[$2] = $3; gsub(/&/, "\\\\&", homepage[$2]); next; } /^htmlname / { # # read lines like: # htmlname /usr/pkgsrc/archivers/arc <a href=../../archivers/arc/index.html>arc-5.21e</A> # # dir=fulldir2pkgdir($2); dir = $2; htmlname = $3; for (i = 4; i <= NF; i++){ htmlname = htmlname " " $i; } gsub(/README.html/, "index.html", htmlname); dir2htmlname[dir] = htmlname; if (debug) printf("added dir2htmlname[%s]=%s\n", dir, htmlname); next; } /^htmloptions / { htmloptions = $3; origfs = FS; FS = "\t"; for (i = 4; i <= NF; i++){ htmloptions = htmloptions " " $i; } FS = origfs; options[$2] = htmloptions; next; } /^index / { # # read lines like: #index /usr/pkgsrc/math/scilab scilab-2.6nb3 # and store the directory name in a associative array where the index # is the package name and in a associative array that lets us lookup # name from directory. We use fuldir2pkgdir to get "math/scilab" # and drop the /usr/pkgsrc part. # # pkgname2dir[$3] = fulldir2pkgdir($2); # pkgdir2name[fulldir2pkgdir($2)] = $3; pkgname2dir[$3] = $2; pkgdir2name[$2] = $3; next; } /^license /{ license[$2] = $3; next; } /^wildcard /{ wildcard[$2] = $3; } END { readme = TMPDIR "/index.html"; printf("Making sure binary package cache file is up to date...\n"); if ( quiet == "yes" ){ cmd = sprintf("%s AWK=%s CMP=%s FIND=%s GREP=%s GZIP_CMD=\"%s\" PKG_INFO=\"%s\" PKG_SUFX=%s SED=%s SORT=%s %s/mk/scripts/binpkg-cache %s --packages %s", SETENV, AWK, CMP, FIND, GREP, GZIP_CMD, PKG_INFO, PKG_SUFX, SED, SORT, PKGSRCDIR, summary, PACKAGES); } else { cmd = sprintf("%s AWK=%s CMP=%s FIND=%s GREP=%s GZIP_CMD=\"%s\" PKG_INFO=\"%s\" PKG_SUFX=%s SED=%s SORT=%s %s/mk/scripts/binpkg-cache %s --packages %s --verbose", SETENV, AWK, CMP, FIND, GREP, GZIP_CMD, PKG_INFO, PKG_SUFX, SED, SORT, PKGSRCDIR, summary, PACKAGES); } if (debug) printf("\nExecute: %s\n",cmd); rc = system(cmd); if (rc != 0 && rc != 2) { printf("\n**** WARNING ****\n") > "/dev/stderr"; printf("Command: %s\nfailed.", cmd) > "/dev/stderr"; printf("**** ------- ****\n") > "/dev/stderr"; exit(1); } if (rc == 2) { printf("\n**** WARNING ****\n") > "/dev/stderr"; printf("* No binary packages directory found\n") > "/dev/stderr"; printf("* List of binary packages will not be generated\n") > "/dev/stderr"; printf("**** ------- ****\n") > "/dev/stderr"; } else { printf("Loading binary package cache file...\n"); load_cache_file( PACKAGES "/.pkgcache" ); if(pkg_count["unknown"] > 0 ) { printf(" Loaded %d binary packages with unknown PKGPATH\n", pkg_count["unknown"]); } } # extract date for vulnerabilities file if (SCAN_VULNERABILITIES == 0) vuldate="<li><em>(no vulnerabilities list, update pkg_install)</em></li>"; else if (SCAN_VULNERABILITIES == 1) vuldate="<li><em>(no vulnerabilities list available)</em></li>"; if (SINGLEPKG != "" ) { printf("Only creating README for %s\n",SINGLEPKG); for( key in depends ) { delete depends[key]; } depends[SINGLEPKG] = "yes"; } printf("Generating index.html files\n"); pkgcnt = 0; if (do_pkg_readme) { templatefile = PKGSRCDIR "/templates/README.pkg"; fatal_check_file(templatefile); for (toppkg in depends){ pkgcnt++; pkgdir = PKGSRCDIR "/" toppkg; readmenew=pkgdir "/index.html"; if (debug) printf("Creating %s for %s\n", readme, readmenew); if (quiet != "yes") { printf("."); if ((pkgcnt % 100) == 0) { printf("\n%d\n", pkgcnt); } } printf("") > readme; run_deps = create_htmldeps(uniq(depends[toppkg])); build_deps = create_htmldeps(uniq(builddepends[toppkg])); vul = ""; if (SCAN_VULNERABILITIES == 2) { pkgbase = pkgdir2name[toppkg]; sub("-[^-]*$", "", pkgbase); cmd = sprintf("%s audit-history %s", PKG_ADMIN, pkgbase); while (cmd | getline vuln_entry) { split(vuln_entry, entry, " "); status_cmd = sprintf("if %s pmatch '%s' %s; then echo open; else echo fixed; fi", PKG_ADMIN, entry[1], pkgdir2name[toppkg]); status_cmd | getline status close(status_cmd) if (status == "fixed") continue status = "a " status; vul = sprintf("%s<li>%s <a href=\"%s\">%s</a> vulnerability</li>\n", vul, status, entry[3], entry[2]); } close(cmd); if ( vul == "" ) { vul="<em>(no vulnerabilities known)</em>"; } } if (debug) { printf("Checking for binary package with lookup_cache( %s)\n", toppkg); } # lookup_cache( wildcard ) will produce HTML for the packages which are found lookup_cache( toppkg ); while((getline < templatefile) > 0){ gsub(/%%PORT%%/, toppkg); gsub(/%%PKG%%/, pkgdir2name[toppkg]); gsub(/%%MAINTAINER%%/, maintainer[toppkg]); gsub(/%%COMMENT%%/, comment[toppkg]); if (homepage[toppkg] == "") { gsub(/%%HOMEPAGE%%/, "<em>none stated</em>"); } else { gsub(/%%HOMEPAGE%%/, "<a href=\"" \ homepage[toppkg] "\">" homepage[toppkg] "</a>"); } if (license[toppkg] == "") { gsub(/%%LICENSE%%/, "<em>none stated</em>"); } else { gsub(/%%LICENSE%%/, "<a href=\"../../licenses/" \ license[toppkg] "\">" license[toppkg] "</a>"); } gsub(/%%VULNERABILITIES%%/, ""vul""); gsub(/%%VULDATE%%/, ""vuldate""); gsub(/%%OPTIONS%%/, escape_re_replacement(""options[toppkg]"")); gsub(/%%BUILD_DEPENDS%%/, ""build_deps""); gsub(/%%RUN_DEPENDS%%/, ""run_deps""); line = $0; if( line ~/%%BIN_PKGS%%/ ) { gsub(/%%BIN_PKGS%%/, "", line); while((getline < binpkgs_file) > 0) { print >> readme; } close( binpkgs_file ); } descr_file = pkgdir "/DESCR" if( line ~/%%DESCR%%/ ) { gsub(/%%DESCR%%/, "", line); while((getline < descr_file ) > 0) { print >> readme; } close( descr_file ); } print line >> readme; } close(readme); close(templatefile); cmd = "if [ ! -d " pkgdir " ]; then exit 1 ; fi"; if (debug) printf("Execute: %s\n",cmd); rc = system(cmd); if (rc != 0) { printf("\n**** WARNING ****\nPackage directory %s\n", pkgdir) > "/dev/stderr"; printf("Does not exist. This is probably ") > "/dev/stderr"; printf("due to an incorrect DEPENDS line.\n") > "/dev/stderr"; printf("Try running: grep %s */*/Makefile\n", fulldir2pkgdir(pkgdir)) > "/dev/stderr"; printf("or: grep %s */*/buildlink3.mk\n", fulldir2pkgdir(pkgdir)) > "/dev/stderr"; printf("to find the problem\n", pkgdir) > "/dev/stderr"; printf("**** ------- ****\n") > "/dev/stderr"; } else { copy_readme(readmenew, readme); } } printf("\n"); } # if (do_pkg_readme) printf("\n"); if (SINGLEPKG != "" ) { close("/dev/stderr"); exit 0; } printf("Generating category readmes\n"); templatefile = PKGSRCDIR "/templates/README.category"; fatal_check_file(templatefile); # string with URLs for all categories (used by the top index.html) allcat = ""; # string with URLs for all pkgs (used by the top index-all.html) tot_numpkg = 0; top_make = PKGSRCDIR"/Makefile"; while((getline < top_make) > 0){ if ($0 ~ /^[ \t]*SUBDIR.*=[^\$]*$/) { category = $0; gsub(/^[ \t]*SUBDIR.*=[ \t]*/, "", category); catdir = PKGSRCDIR"/"category; readmenew = catdir"/index.html"; if (quiet != "yes") { printf("Category = %s\n", category); } cat_make = catdir"/Makefile"; pkgs = ""; numpkg = 0; print "" > readme; while((getline < cat_make) > 0){ if ($0 ~ /^[ \t]*SUBDIR.*=[^\$]*$/) { pkg = $0; gsub(/^[ \t]*SUBDIR.*=[ \t]*/, "", pkg); dir = category"/"pkg; numpkg++; tot_numpkg++; if (debug) { printf("\tAdding %s (%s : %s)\n", dir, pkgdir2name[dir], comment[dir]); } pkgs = sprintf("%s<dt><a href=\"%s/index.html\">%s</a></dt><dd>%s</dd>\n", pkgs, pkg, pkgdir2name[dir], comment[dir]); # Prefix with the package name in a comment for sorting. allpkg[tot_numpkg] = sprintf("<!-- %s --><dt><a href=\"%s/%s/index.html\">%s</a></dt><dd>%s</dd>\n", pkgdir2name[dir], category, pkg, pkgdir2name[dir], comment[dir]); # we need slightly fewer escapes here since we are not gsub()-ing # allpkg[] into the output files but just printf()-ing it. gsub(/\\&/, "\\&", allpkg[tot_numpkg]); } else if ($0 ~ /^[ \t]*COMMENT/) { descr = $0; gsub(/^[ \t]*COMMENT.*=[ \t]*/, "", descr); } } while ((getline < templatefile) > 0){ gsub(/%%CATEGORY%%/, category); gsub(/%%NUMITEMS%%/, numpkg); gsub(/%%DESCR%%/, descr); gsub(/%%SUBDIR%%/, ""pkgs""); print $0 >> readme; } close(readme); close(templatefile); copy_readme(readmenew, readme); gsub(/href=\"/, "href=\""category"/", pkgs); allcat = sprintf("%s<dt><a href=\"%s/index.html\">%s</a></dt><dd>%s</dd>\n", allcat, category, category, descr); close(cat_make); } } close(top_make); printf("Generating toplevel readmes:\n"); templatefile = PKGSRCDIR "/templates/README.top"; fatal_check_file(templatefile); readmenew = PKGSRCDIR "/index.html" printf("\t%s\n", readmenew); print "" > readme; while((getline < templatefile) > 0){ gsub(/%%DESCR%%/, ""); gsub(/%%SUBDIR%%/, allcat); print >> readme; } close(readme); close(templatefile); copy_readme(readmenew, readme); templatefile = PKGSRCDIR "/templates/README.all"; fatal_check_file(templatefile); readmenew = PKGSRCDIR "/index-all.html"; printf("\t%s\n", readmenew); # sort the pkgs sfile = TMPDIR"/unsorted"; spipe = "sort " sfile; i = 1; print "" >sfile; while(i in allpkg) { printf("%s",allpkg[i]) >> sfile; i++; } close(sfile); print "" > readme; while((getline < templatefile) > 0){ line = $0; if ($0 ~ /%%PKGS%%/) { while((spipe | getline) > 0) { print >> readme; } close(spipe); } else { gsub(/%%DESCR%%/, "", line); gsub(/%%NPKGS%%/, tot_numpkg, line); print line >> readme; } } close(readme); close(templatefile); copy_readme(readmenew, readme); close("/dev/stderr"); exit 0; } function create_htmldeps(dependslist){ htmldeps = ""; for( key in dpkgs ) { delete dpkgs[key]; } split(dependslist, dpkgs); i = 1; while(i in dpkgs){ if (debug) { printf("\tdpkg=%s, pat2dir[%s] = %s\n", dpkgs[i], dpkgs[i], pat2dir[dpkgs[i]]); } htmldeps = sprintf("%s<a href=\"../../%s/index.html\">%s</a>\n", htmldeps, pat2dir[dpkgs[i]], pat2dir[dpkgs[i]]); i = i + 1; } if ( i == 1 ) { htmldeps = "<em>(none)</em>"; } return htmldeps; } # # take a string which has special characters like '+' in it and # escape them. Also put a space before and after since that's how # we'll distinguish things like gnome from gnome-libs # function reg2str(reg){ gsub(/\./, "\\.", reg); gsub(/\+/, "\\+", reg); gsub(/\*/, "\\*", reg); gsub(/\?/, "\\?", reg); gsub(/\[/, "\\[", reg); gsub(/\]/, "\\]", reg); reg = " "reg" "; return(reg); } function escape_re_replacement(s) { gsub(/&/, "\\\\\\&", s); return s; } # # take a string which has a shell glob pattern and turn it into # an awk regular expression. # function glob2reg(reg){ # escape some characters which are special in regular expressions gsub(/\./, "\\.", reg); gsub(/\+/, "\\+", reg); # and reformat some others gsub(/\*/, ".*", reg); gsub(/\?/, ".?", reg); # finally, expand {a,b,c} type patterns return(reg); } # # accepts a full path to a package directory, like "/usr/pkgsrc/math/scilab" # and returns just the last 2 directories, like "math/scilab" # function fulldir2pkgdir(d, i){ i = match(d, /\/[^\/]+\/[^\/]+$/); return substr(d, i + 1); } # # take the depends lists and uniq them. # function uniq(list, deps, i, ulist){ # split out the depends split(list, deps); i = 1; ulist = " "; while (i in deps){ # printf("uniq(): Checking \"%s\"\n", ulist); # printf(" for \"%s\"\n", reg2str(deps[i])); if (ulist !~reg2str(deps[i])){ ulist = ulist deps[i]" "; } i++; } return(ulist); } function fatal_check_file(file, cmd){ cmd="test -f " file ; if (debug) printf("Execute: %s\n",cmd); if (system(cmd) != 0) { printf("**** FATAL ****\nRequired file %s does not exist\n", file) > "/dev/stderr"; printf("**** ------- ****\n") > "/dev/stderr"; close("/dev/stderr"); exit(1); } } # 'new' is the newly created index.html file # 'old' is the existing (possibly not present) index.html file # # This function copies over the 'new' file if the 'old' one does # not exist or if they are different. In addition, the 'new' one # which is a temporary file is removed at the end function copy_readme(old, new, cmd, rc) { # if the index.html file does not exist at all then copy over # the one we created cmd = "if [ ! -f "old" ]; then cp " new " " old " ; fi"; if (debug) printf("copy_readme() execute: %s\n",cmd); rc = system(cmd); if (rc != 0) { printf("**** WARNING ****\nThe command\n %s\n", cmd) > "/dev/stderr"; printf("failed with result code %d\n", rc) > "/dev/stderr"; printf("**** ------- ****\n") > "/dev/stderr"; } # Compare the existing index.html file to the one we created. If they are # not the same, then copy over the one we created cmd = sprintf("%s -s %s %s ; if test $? -ne 0 ; then mv -f %s %s ; fi", CMP, new, old, new, old); if (debug) printf("copy_readme() execute: %s\n",cmd); rc = system(cmd); if (rc != 0) { printf("**** WARNING ****\nThe command\n %s\n", cmd) > "/dev/stderr"; printf("failed with result code %d\n", rc) > "/dev/stderr"; printf("**** ------- ****\n") > "/dev/stderr"; } # If the temp file still exists, then delete it cmd = " if [ -f "new" ]; then rm -f "new" ; fi"; if (debug) printf("copy_readme() execute: %s\n",cmd); rc = system(cmd); if (rc != 0) { printf("**** WARNING ****\nThe command\n %s\n", cmd) > "/dev/stderr"; printf("failed with result code %d\n", rc) > "/dev/stderr"; printf("**** ------- ****\n") > "/dev/stderr"; } } function load_cache_file( file, pkgfile, opsys, osver, march, wk, rx ) { if ( quiet != "yes" ) printf(" * %s\n", file); fatal_check_file( file ); # read the cache file while( getline < file ) { # if this line points to another cache file, then recursively # load it if( $0 ~ /^pkgcache_cachefile/ ) { if( debug ) printf("\tFound pkgcache_cachefile line.\n"); load_cache_file( $2 ); } else if( $0 ~/^pkgcache_begin /) { pkgfile = $2; if( debug ) printf("\tStarting %s\n", pkgfile); opsys = "unknown"; osver = "unknown"; march = "unknown"; pkgpath = "unknown"; } else if( $0 ~/^PKGPATH=/ ) { pkgpath = $0; gsub(/PKGPATH=[ \t]*/, "", pkgpath); } else if( $0 ~/^OPSYS=/ ) { opsys = $0; gsub(/OPSYS=[ \t]*/, "", opsys); } else if( $0 ~/^OS_VERSION=/ ) { osver = $0; gsub(/OS_VERSION=[ \t]*/, "", osver); } else if( $0 ~/^MACHINE_ARCH=/ ) { march = $0; gsub(/MACHINE_ARCH=[ \t]*/, "", march); } else if( $0 ~/^pkgcache_end /) { if( debug ) printf("\t%s, OPSYS=%s, OS_VERSION=%s, MACHINE_ARCH=%s, PKGPATH=%s\n", pkgfile, opsys, osver, march, pkpath); pkg_count[pkgpath] = pkg_count[pkgpath] + 1; opsys_list[pkgpath, pkg_count[pkgpath]] = opsys; osver_list[pkgpath, pkg_count[pkgpath]] = osver; march_list[pkgpath, pkg_count[pkgpath]] = march; pkgfile_list[pkgpath, pkg_count[pkgpath]] = pkgfile; gsub(/.*\//, "", pkgfile); pkgnm_list[pkgpath, pkg_count[pkgpath]] = pkgfile; } else { # skip this line } } # close the cache file close( file ); } function lookup_cache( d, binpkgs) { if( debug ) printf("lookup_cache( %s ): pkg_count = %d\n", d, pkg_count[d]); binpkgs_file = TMPDIR "/binpkgs"; spipe = SORT " > " binpkgs_file; for(i=1 ; i<=pkg_count[d]; i=i+1) { printf("<tr><td>%s %s</td><td>%s</td><td><a href=\"%s/%s\">%s</a></td></tr>\n", opsys_list[d, i], osver_list[d, i], march_list[d, i], PKG_URL, pkgfile_list[d, i], pkgnm_list[d, i]) | spipe; } if( pkg_count[d] == 0 ) { printf("<tr><td><em>(none)</em></td></tr>\n") | spipe; } close( spipe ); }
28.049724
164
0.582923
2ba1e4badfe81e735b3272a123b45bfca0bad535
17
awk
Awk
Task/Read-a-file-line-by-line/AWK/read-a-file-line-by-line-2.awk
LaudateCorpus1/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
1
2018-11-09T22:08:38.000Z
2018-11-09T22:08:38.000Z
Task/Read-a-file-line-by-line/AWK/read-a-file-line-by-line-2.awk
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
null
null
null
Task/Read-a-file-line-by-line/AWK/read-a-file-line-by-line-2.awk
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
awk '1' filename
8.5
16
0.705882
7e4f1a545d0c5219748f3fe5499ed3e666b38f3f
1,030
awk
Awk
tools/system_select.awk
GadgetSeed/gadgetseed
a2abb702ac00b591e22997d81830e6cbc83f6ac2
[ "MIT" ]
7
2018-08-05T07:09:12.000Z
2022-03-24T16:09:01.000Z
tools/system_select.awk
GadgetSeed/gadgetseed
a2abb702ac00b591e22997d81830e6cbc83f6ac2
[ "MIT" ]
null
null
null
tools/system_select.awk
GadgetSeed/gadgetseed
a2abb702ac00b591e22997d81830e6cbc83f6ac2
[ "MIT" ]
null
null
null
BEGIN { printf("*** Select target system ***\n"); num = 1; } { desc = ""; sysname = ""; cmd = sprintf("cat $SYSCONF_DIR/%s | grep ^@description | cut -d ' ' -f 2-", $1); cmd | getline desc; close(cmd); cmd = sprintf("cat $SYSCONF_DIR/%s | grep ^@system | cut -d ' ' -f 2-", $1); cmd | getline sysname; close(cmd); printf("%3d : %-30s : %-45s : %s\n", num, sysname, desc, $1); sysnames[num] = sysname; confnames[num] = $1; num ++; } END { printf("Input No. : "); keyin = ""; getline keyin <"-"; if((keyin != 0) && (keyin < num)) { sysname = sysnames[keyin]; confname = confnames[keyin]; printf("Select : %d\n", keyin); printf("Target system : %s (%s)\n", sysname, confname); } else { printf("Select canceled.\n"); exit(1); } gsub(".conf", "", confname); cmd = sprintf("echo \"SYSTEM_CONFIG =\" \"%s\" > config.tmp", confname); system(cmd); cmd = sprintf("cd %s; grep -H @target *.conf | grep -w %s | cut -d ':' -f 1 > $PRJ_DIR/conf_list", ENVIRON["CONFIGS_DIR"], sysname); system(cmd); }
23.953488
133
0.565049
b9fda4d1a27458793432b3037820a44a12a565ff
769
awk
Awk
fixedWidth2csv.awk
bobpreston/TotalAccess
cc120c3e7d4f11348692ab8b554ad20d3be84629
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
fixedWidth2csv.awk
bobpreston/TotalAccess
cc120c3e7d4f11348692ab8b554ad20d3be84629
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
fixedWidth2csv.awk
bobpreston/TotalAccess
cc120c3e7d4f11348692ab8b554ad20d3be84629
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
BEGIN { FS = "[\t]"; # Tell compiler that this is an array. widths[0]; createListArray(widths, 0, 6, 2, 2, 2, 10, 2, 10, 3, 24, 3, 2, 3, 3, 1, 8, 2, 3, 8, 10, 10, 10, 4, 3); } # Parse each fixed width line. { $0 = parseFixedLine($0, widths); } # Check for valid entry. (integer($1) != 0) { line = ""; isFirst = 1; for (i = 1; i <= NF; i++) { # Skip white space. if ((i % 2) == 0) { continue; } $i = escapeCsv(trim($i)); if (!isFirst) { line = line ","; } isFirst = 0; line = line $i; } print line; }
20.236842
110
0.355007
97ba0bf25fd04b55ae9dfd430ba356d94fec8cb4
112
awk
Awk
awk/looptest.awk
kentarchie/TawkingAwk
63b6b67baaedc7fadb39cbab9363be8cd2446ac9
[ "MIT" ]
null
null
null
awk/looptest.awk
kentarchie/TawkingAwk
63b6b67baaedc7fadb39cbab9363be8cd2446ac9
[ "MIT" ]
null
null
null
awk/looptest.awk
kentarchie/TawkingAwk
63b6b67baaedc7fadb39cbab9363be8cd2446ac9
[ "MIT" ]
null
null
null
gawk ' BEGIN { arr[5] = 5; arr[1] = 1; arr[6] = 6; arr["six"] = "six"; for(i in arr) print i, arr[i]; } '
11.2
31
0.464286
8610b0d1db315fb5746c773eb8dac0e32dbb5424
368
awk
Awk
scripts/Cluster_classification/evalue_06_filter.awk
functional-dark-side/functional-dark-side.github.io
bd6a7baee234079afa45598aeb6f3cbbdd1485f6
[ "Apache-2.0" ]
4
2020-07-01T23:38:46.000Z
2020-07-02T19:30:11.000Z
scripts/Cluster_classification/evalue_06_filter.awk
functional-dark-side/functional-dark-side.github.io
bd6a7baee234079afa45598aeb6f3cbbdd1485f6
[ "Apache-2.0" ]
3
2020-06-05T04:35:40.000Z
2021-05-24T16:42:58.000Z
scripts/Cluster_classification/evalue_06_filter.awk
functional-dark-side/functional-dark-side.github.io
bd6a7baee234079afa45598aeb6f3cbbdd1485f6
[ "Apache-2.0" ]
1
2020-09-30T12:50:08.000Z
2020-09-30T12:50:08.000Z
#!/bin/awk -f # if the results from the search were coverted to a flat file with convertalis (if converted with createtsv the e-value column is $5) { if ($1 in array) { A=array[$1] L=(log($11)/log(10)); if(L <= A) { print $0; } }else{ L=0.6*(log($11)/log(10)); array[$1]=L; print $0; } }
21.647059
133
0.48913
06a00fdedc950dd3cf5c7dd78f4d2de38210ba0d
171
awk
Awk
src/czinspect/tools/genhelp-h.awk
magnostherobot/czi-tools
e6fe3f2e078ba794f3dcadabea4265b9ecc9ba7b
[ "BSD-2-Clause" ]
5
2019-04-02T00:56:01.000Z
2022-03-11T06:33:52.000Z
src/czinspect/tools/genhelp-h.awk
aly202012/czi-tools
e6fe3f2e078ba794f3dcadabea4265b9ecc9ba7b
[ "BSD-2-Clause" ]
4
2018-09-14T10:00:09.000Z
2019-05-03T19:14:38.000Z
src/czinspect/tools/genhelp-h.awk
aly202012/czi-tools
e6fe3f2e078ba794f3dcadabea4265b9ecc9ba7b
[ "BSD-2-Clause" ]
2
2020-11-16T20:46:47.000Z
2021-03-31T12:49:16.000Z
#!/usr/bin/env awk -f BEGIN { OFS=""; } { print "extern char _binary_helptxt_", $1, "_start[];"; } { print "extern char _binary_helptxt_", $1, "_end[];"; }
12.214286
58
0.555556
ceb42e63b3f5dc484bc3885a63d6f854bede34fc
957
awk
Awk
script.awk
welaika/Sublime-Text-2-Compass-Mixins
64693182cee8f30b639871fbab8165bd103c3fa8
[ "MIT", "Unlicense" ]
null
null
null
script.awk
welaika/Sublime-Text-2-Compass-Mixins
64693182cee8f30b639871fbab8165bd103c3fa8
[ "MIT", "Unlicense" ]
1
2015-01-08T09:29:40.000Z
2015-01-08T09:29:40.000Z
script.awk
welaika/Sublime-Text-2-Compass-Mixins
64693182cee8f30b639871fbab8165bd103c3fa8
[ "MIT", "Unlicense" ]
null
null
null
#!/usr/bin/gawk -f function trim(v) { gsub(/^[ \t]+|[ \t]+$/, "", v) return v } function remove_boundaries(v) { if (substr(v, 1, 1) == "(") { len = length(v) v = substr(v, 2, len-2) } return v; } function escape_chars(v) { gsub(/[$]/, "\\\\$", v) return v } function replace_double_quotes(v) { gsub(/["]/, "'", v) return v } BEGIN { FPAT = "(^[^(]+)|\\((.+)\\)$" print "{" print "\"scope\": \"source.sass - meta.property-value\"," print "\"completions\": [" } { printf("{\n\"trigger\": \"%s\",\n\"contents\": \"%s", $1, $1) if (NF == 2) { printf("(") $2 = remove_boundaries($2) split($2, arguments, ",") for(i=1; i <= length(arguments); i++) { argument = trim(replace_double_quotes(escape_chars(arguments[i]))) printf(" ${%d:%s}", i, argument) if (i<length(arguments)) printf(",") } printf (" )") } printf("\"\n},\n") } END { print "]" print "}" }
15.435484
72
0.484848
f6dc2f7b7a702dfcefe5316eb1cb9d76d5b1408e
211
awk
Awk
printscan/print/drivers/usermode/gpdres/epepcres/etc/escp22.awk
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
printscan/print/drivers/usermode/gpdres/epepcres/etc/escp22.awk
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
printscan/print/drivers/usermode/gpdres/epepcres/etc/escp22.awk
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
/rcNameID/ || /OptionID/ { if ($2 !~ /^[0-9]/) { print; next } if ($2 >= 258 && $2 <= 274) id=$2 + 22; else { print "*Error: Unknown NameID: " $2; next } print " " $1 " " id next } { print }
23.444444
52
0.445498
92210e2a4178b7ce7c5882fd715b89db103b7e89
3,674
awk
Awk
netctl/bin/pipe.awk
serhepopovych/repipe
88663259ef206d0667e337041b46722f6b231ae1
[ "MIT" ]
null
null
null
netctl/bin/pipe.awk
serhepopovych/repipe
88663259ef206d0667e337041b46722f6b231ae1
[ "MIT" ]
null
null
null
netctl/bin/pipe.awk
serhepopovych/repipe
88663259ef206d0667e337041b46722f6b231ae1
[ "MIT" ]
null
null
null
#!/usr/bin/gawk -f # Source USRXML database parsing library. @include "@target@/netctl/lib/awk/libusrxml.awk" ################################################################################ BEGIN{ ## ## Initialize user database parser. ## h = init_usrxml_parser("pipe.awk", 1); if (h < 0) exit 1; } { ## ## Parse user database. ## line = $0; if (run_usrxml_parser(h, line) < 0) exit 1; } END{ ## ## Data-rate units. ## # SI units["kbit"] = 1000; units["kbps"] = units["kbit"] * 8; units["mbit"] = 1000 * 1000; units["mbps"] = units["mbit"] * 8; units["gbit"] = 1000 * 1000 * 1000; units["gbps"] = units["gbit"] * 8; units["tbit"] = 1000 * 1000 * 1000 * 1000; units["tbps"] = units["tbit"] * 8; # IEC units["kibit"] = 1024; units["kibps"] = units["kibit"] * 8; units["mibit"] = 1024 * 1024; units["mibps"] = units["mibit"] * 8; units["gibit"] = 1024 * 1024 * 1024; units["gibps"] = units["gibit"] * 8; units["tibit"] = 1024 * 1024 * 1024 * 1024; units["tibps"] = units["tibit"] * 8; if (fout) print "" >fout; prog = USRXML__instance[h,"prog"]; ifn = USRXML_ifnames[h,"num"]; for (iff = 0; iff < ifn; iff++) { # h,userid i = h SUBSEP iff; # Skip holes entries if (!(i in USRXML_ifnames)) continue; username = USRXML_ifnames[i]; # Skip inactive users if (USRXML_ifnames[h,username,"inactive"]) continue; # h,"orig" hh = h USRXML_orig; # hh,userid i_dst = hh SUBSEP iff; usrxml__copy_user_pipe(hh, i_dst, i); usrxml__delete_pipe(i, 1); cmd = "@target@/netctl/bin/shapers " username; while ((ret = (cmd | getline line)) > 0) { printf "%s: %s: line: %s\n", prog, username, line >"/dev/stderr"; n = split(line, a, " "); if (n == 3) { ## Valid policy in format: "zone dir bw", apply # Translate units to kbit (default is kbit) unit = a[3]; sub("^[[:digit:]]+", "", unit); sub(unit "$", "", a[3]); unit = toupper(unit); if (unit in units) a[3] *= units[unit] / units["kbit"]; # Translate unknown zones to "local" if (a[1] != "world" && a[1] != "all") a[1] = "local"; p = USRXML_userpipe[i]++; # h,userid,pipeid j = i SUBSEP p; USRXML_userpipe[j] = p + 1; USRXML_userpipe[j,"zone"] = a[1]; USRXML_userpipe[j,"dir"] = a[2]; USRXML_userpipe[j,"bw"] = a[3]; } else if (n == 0) { ## No fields: may be empty line, skip } else if (n == 1 && a[1] == "none") { ## Valid policy in format: "none", skip } else { ## Unknown format: failure break; } } close(cmd); m = (i in USRXML_userpipe) ? USRXML_userpipe[i] : 0; if (ret || !m || usrxml__scope_validate_pipe(i)) usrxml__copy_user_pipe(h, i, i_dst); usrxml__delete_pipe(i_dst, 1); if (ret > 0) { printf "%s: %s: get shapers failed\n", prog, username >"/dev/stderr"; } else if (ret < 0) { printf "%s: %s: read error: %s\n", prog, username, ERRNO >"/dev/stderr"; } else { print_usrxml_entry(h, username, fout); } # Report final shaper configuration to stderr ret = -1; m = (i in USRXML_userpipe) ? USRXML_userpipe[i] : 0; for (p = 0; p < m; p++) { # h,userid,pipeid j = i SUBSEP p; # Skip hole entries if (!(j in USRXML_userpipe)) continue; line = ""; line = line USRXML_userpipe[j,"zone"] " "; line = line USRXML_userpipe[j,"dir"] " "; line = line USRXML_userpipe[j,"bw"]; printf "%s: %s: pipe: %s\n", prog, username, line >"/dev/stderr"; ret = 1; } if (ret < 0) { printf "%s: %s: no shapers\n", prog, username >"/dev/stderr"; } } ## ## Finish user database parsing. ## if (fini_usrxml_parser(h) < 0) exit 1; }
21.114943
80
0.551715
67fe86182e0347b092a43bb8b6db359750d22393
423
awk
Awk
include/refs.awk
djanderson/aho
9dd85bb457551bc5e6a4ef7089b254990e122b26
[ "MIT" ]
170
2021-06-11T14:42:57.000Z
2022-02-15T10:23:55.000Z
include/refs.awk
djanderson/aho
9dd85bb457551bc5e6a4ef7089b254990e122b26
[ "MIT" ]
null
null
null
include/refs.awk
djanderson/aho
9dd85bb457551bc5e6a4ef7089b254990e122b26
[ "MIT" ]
5
2021-10-07T12:52:45.000Z
2021-12-11T17:18:38.000Z
@namespace "refs" BEGIN { Dir = path::AhoDir "/refs" } function init(directory, path) { if (!directory) { print "Must pass directory to init" > "/dev/stderr" return 1 } path = directory "/refs" return system("mkdir -p " path "/heads " path "/tags") } function set_head(branch, commit, file) { file = (refs::Dir "/heads/" branch) print commit > file close(file) }
16.269231
59
0.579196
6c190bbf271d7ff0edfa9817e71cee2821eab5cb
1,417
awk
Awk
cloakx/extract_analysis.awk
skarami/cloakx
a6d0b808b5cfa665a1328c49931511d57f8aa6a7
[ "BSD-2-Clause" ]
2
2020-08-20T14:11:14.000Z
2021-04-12T08:11:57.000Z
cloakx/extract_analysis.awk
sefcom/cloakx
a6d0b808b5cfa665a1328c49931511d57f8aa6a7
[ "BSD-2-Clause" ]
null
null
null
cloakx/extract_analysis.awk
sefcom/cloakx
a6d0b808b5cfa665a1328c49931511d57f8aa6a7
[ "BSD-2-Clause" ]
1
2021-02-22T00:23:12.000Z
2021-02-22T00:23:12.000Z
BEGIN{ cur_id=""; skip=0; total=0; anal=0; excep=0; timeout=0; js_files=0; complete=0; quad1=0; quad2=0; quad3=0; noexceps=0; num_anal=0; } { js_files++; if ($4=="Analysis") { skip+= $26; anal+=$24; total+=$28; } if ($4=="Exception"){ excep+=1; } if ($5=="Timedout"){ printf("%s TIMEOUT\n",cur_id); timeout+=1; } if (cur_id != $1) { num_anal++; if (total==0){ perc=0; printf "%s Excep:%d TO:%d FileCnt:%d ---> NONE \n", cur_id, excep, timeout, js_files } else { perc=((anal+1)/(total+1)*100) if (excep==0 && timeout==0){ noexceps++; } if (excep==0 && timeout==0 && total==anal && total > 0){ complete++; printf "%s ***PERFECT*** Excep:%d TO:%d FileCnt:%d ---> Analysis:%d (%.2f) Skip:%d Total:%d \n", cur_id, excep, timeout, js_files, anal, perc, skip, total } else{ printf "%s Excep:%d TO:%d FileCnt:%d ---> Analysis:%d (%.2f) Skip:%d Total:%d \n", cur_id, excep, timeout, js_files, anal, perc, skip, total } } cur_id=$1; skip=0; total=0; anal=0; excep=0; timeout=0; js_files=0; } } END{ printf "No Exceptions %d (%.2f)\n", noexceps, noexceps/num_anal*100 printf "Total Completely Analyzed %d (%.2f) \n ", complete, complete/num_anal*100 print "Total Considered " num_anal }
21.149254
159
0.520819
d6d02adf198799b85b54fd110eb8a0758111f916
2,360
awk
Awk
day2.awk
nikicoon/adventofcode-2019
c9f7b7f921debda299fc0100dc73a517e8114986
[ "BSD-2-Clause" ]
null
null
null
day2.awk
nikicoon/adventofcode-2019
c9f7b7f921debda299fc0100dc73a517e8114986
[ "BSD-2-Clause" ]
null
null
null
day2.awk
nikicoon/adventofcode-2019
c9f7b7f921debda299fc0100dc73a517e8114986
[ "BSD-2-Clause" ]
null
null
null
# an opcode is an integer followed by 3 other integers # an opcode sequence consists of 4 integers # valid opcodes are: # opcode "1" adds up # opcode "2" multiplies # opcode 99 means "program is finished, immediately halt" # everything else is is an (indication for an) error (?) # opcodes operate on the entire record # if an opcode is processed, advance 4 positions to the next opcode BEGIN { RS = "," } { ops[k++] = $1 } function copy_array(a, b) { delete a; for ( q in b ) { a[q] = b[q]; } } function try(noun, verb) { fops[1] = noun; fops[2] = verb; } function calculate_array(arr) { for (p = 0; arr[p] != 99; p += 4) { if (arr[p] == 1) arr[arr[p+3]] = arr[arr[p+1]] + arr[arr[p+2]]; else if (arr[p] == 2) arr[arr[p+3]] = arr[arr[p+1]] * arr[arr[p+2]]; } } END { ops[1] = 12; ops[2] = 2; # for ( i in ops) # val++; # for (i=0; i<=NR;i++) # print ops[i]; # outputIndex = ops[i + 3] # inputA = ops[ops[i + 1]] # inputB = ops[ops[i + 2]] # walk through array ops. ops contains entries from inputfile. # break at ops[i] = 99. # for (i = 0; i <= val; i += 4) { copy_array(nops, ops); calculate_array(ops); # for (i = 0; ops[i] != 99; i += 4) { # if (ops[i] == 1) # ops[ops[i+3]] = ops[ops[i+1]] + ops[ops[i+2]]; # else if (ops[i] == 2) # ops[ops[i+3]] = ops[ops[i+1]] * ops[ops[i+2]]; # else if (ops[i] == 99) # break; # else # print "Invalid input"; # } # for (i=0; i<=NR;i++) # print ops[i]; print ops[0]; # ops[] is our original array, we need this ("initial memory"). # start each itteration with the original array ("reset memory"). # delete fops[] elements, copy ops[] into fops[]. # this block has to run repeatedly -> make it a function? # function copy_array() { # delete fops; # for ( i in ops ) { # fops[i] = ops[i]; # } # } copy_array(fops, nops); for ( i = 0; i < 100; i++) { for (j = 0; j < 100; j++) { try(i, j); #print i " " j; calculate_array(fops); #print fops[0]; #print 100 * i + j; # for (w=0; w<=NR;w++) # print fops[w]; if (fops[0] == 19690720) { print 100 * i + j; exit; } # delete fops; copy_array(fops, nops); } } }
26.516854
69
0.510593
5d222a65240fcae2b68751037b92cb6483a83cc8
162
awk
Awk
scripts/awk/count_word.awk
chenmingqiang/ReadingNotes
b45a84be9ce5eb30ec6e4ef22abbdade93c554f5
[ "MIT" ]
null
null
null
scripts/awk/count_word.awk
chenmingqiang/ReadingNotes
b45a84be9ce5eb30ec6e4ef22abbdade93c554f5
[ "MIT" ]
null
null
null
scripts/awk/count_word.awk
chenmingqiang/ReadingNotes
b45a84be9ce5eb30ec6e4ef22abbdade93c554f5
[ "MIT" ]
null
null
null
#!/usr/bin/awk -f BEGIN { total = 0; FS=" "; } { total += NF; print "line", FNR, " : ",NF, "words" } END { print "total : ", total }
10.125
40
0.41358
c0993e65ea873d77404c73476809d36793dfe664
4,982
awk
Awk
android-ndk-r10b/build/awk/extract-debuggable.awk
perezite/Boost4Android
9ed03a45815aead156c129da1927cc04b8caa6a3
[ "BSL-1.0" ]
1
2019-07-10T15:21:02.000Z
2019-07-10T15:21:02.000Z
android-ndk-r10b/build/awk/extract-debuggable.awk
perezite/Boost4Android
9ed03a45815aead156c129da1927cc04b8caa6a3
[ "BSL-1.0" ]
null
null
null
android-ndk-r10b/build/awk/extract-debuggable.awk
perezite/Boost4Android
9ed03a45815aead156c129da1927cc04b8caa6a3
[ "BSL-1.0" ]
1
2019-02-25T11:55:44.000Z
2019-02-25T11:55:44.000Z
# Copyright (C) 2010 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # A nawk/gawk script used to extract the debuggable flag from an # application's manifest (i.e. AndroidManifest.xml). Usage: # # awk -f <this-script> AndroidManifest.xml # BEGIN { DEBUGGABLE = ""; while ( xml_event() ) { # simply extract the 'android:debuggable' attribute value from # the first <manifest><application> element we find. if ( XML_TYPE == "BEGIN" && XML_TAG == "APPLICATION" && XML_RPATH == "APPLICATION/MANIFEST/" ) { DEBUGGABLE = XML_ATTR["android:debuggable"]; break; } } # ensure the value is either "true" or "false" if ( DEBUGGABLE != "true" ) DEBUGGABLE = "false"; print DEBUGGABLE; } # # the following is copied directly from xml.awk - see this file for # usage and implementation details. # function xml_event () { RS=">"; XML_TAG=XML_TYPE=""; split("", XML_ATTR); while ( 1 ) { if (_xml_closing) { # delayed direct tag closure XML_TAG = _xml_closing; XML_TYPE = "END"; _xml_closing = ""; _xml_exit(XML_TAG); return 1; } if (getline <= 0) return 0; # read new input line _xml_p = index($0, "<"); # get start marker if (_xml_p == 0) return 0; # end of file (or malformed input) $0 = substr($0, _xml_p) # remove anything before '<' # ignore CData / Comments / Processing instructions / Declarations if (_xml_in_section("<!\\[[Cc][Dd][Aa][Tt][Aa]\\[", "]]") || _xml_in_section("<!--", "--") || _xml_in_section("<\\?", "\\?") || _xml_in_section("<!", "")) { continue; } if (substr($0, 1, 2) == "</") { # is it a closing tag ? XML_TYPE = "END"; $0 = substr($0, 3); } else { # nope, it's an opening one XML_TYPE = "BEGIN"; $0 = substr($0, 2); } XML_TAG = $0 sub("[ \r\n\t/].*$", "", XML_TAG); # extract tag name XML_TAG = toupper(XML_TAG); # uppercase it if ( XML_TAG !~ /^[A-Z][-+_.:0-9A-Z]*$/ ) # validate it _xml_panic("Invalid tag name: " XML_TAG); if (XML_TYPE == "BEGIN") { # update reverse path _xml_enter(XML_TAG); } else { _xml_exit(XML_TAG); } sub("[^ \r\n\t]*[ \r\n\t]*", "", $0); # get rid of tag and spaces while ($0) { # process attributes if ($0 == "/") { # deal with direct closing tag, e.g. </foo> _xml_closing = XML_TAG; # record delayed tag closure. break } _xml_attrib = $0; sub(/=.*$/,"",_xml_attrib); # extract attribute name sub(/^[^=]*/,"",$0); # remove it from record _xml_attrib = tolower(_xml_attrib); if ( _xml_attrib !~ /^[a-z][-+_0-9a-z:]*$/ ) # validate it _xml_panic("Invalid attribute name: " _xml_attrib); if (substr($0,1,2) == "=\"") { # value is ="something" _xml_value = substr($0,3); sub(/".*$/,"",_xml_value); sub(/^="[^"]*"/,"",$0); } else if (substr($0,1,2) == "='") { # value is ='something' _xml_value = substr($0,3); sub(/'.*$/,"",_xml_value); sub(/^='[^']*'/,"",$0); } else { _xml_panic("Invalid attribute value syntax for " _xml_attrib ": " $0); } XML_ATTR[_xml_attrib] = _xml_value; # store attribute name/value sub(/^[ \t\r\n]*/,"",$0); # get rid of remaining leading spaces } return 1; # now return, XML_TYPE/TAG/ATTR/RPATH are set } } function _xml_panic (msg) { print msg > "/dev/stderr" exit(1) } function _xml_in_section (sec_begin, sec_end) { if (!match( $0, "^" sec_begin )) return 0; while (!match($0, sec_end "$")) { if (getline <= 0) _xml_panic("Unexpected EOF: " ERRNO); } return 1; } function _xml_enter (tag) { XML_RPATH = tag "/" XML_RPATH; } function _xml_exit (tag) { _xml_p = index(XML_RPATH, "/"); _xml_expected = substr(XML_RPATH, 1, _xml_p-1); if (_xml_expected != XML_TAG) _xml_panic("Unexpected close tag: " XML_TAG ", expecting " _xml_expected); XML_RPATH = substr(XML_RPATH, _xml_p+1); }
36.364964
86
0.538739
1ae21e1f4f1252acec037a5906c13d1184041e04
58
bat
Batchfile
directshow/Lightpack-filter-gui/run.bat
matthewn4444/Lightpack-Filter-and-API
b4cd7d448f12a111ebf8a8b55338a2d75e120517
[ "MIT-0" ]
9
2015-01-29T02:26:58.000Z
2019-11-20T03:16:16.000Z
directshow/Lightpack-filter-gui/run.bat
matthewn4444/Lightpack-Filter-and-API
b4cd7d448f12a111ebf8a8b55338a2d75e120517
[ "MIT-0" ]
7
2015-07-31T15:56:10.000Z
2017-11-05T22:18:02.000Z
directshow/Lightpack-filter-gui/run.bat
matthewn4444/Lightpack-Filter-and-API
b4cd7d448f12a111ebf8a8b55338a2d75e120517
[ "MIT-0" ]
null
null
null
@echo off call "compile.bat" start ../../Release/nw.exe
9.666667
26
0.655172
1aa8718d51118ffc55aa410c7552608ad97b6f34
49
cmd
Batchfile
code/Nuget/build.cmd
IgorKorytko/speak.theming
bcb2257d01107d7934c9443a0c3a93eb9518eec3
[ "MIT" ]
1
2017-07-11T17:36:47.000Z
2017-07-11T17:36:47.000Z
code/Nuget/build.cmd
ogojack/speak.theming
bcb2257d01107d7934c9443a0c3a93eb9518eec3
[ "MIT" ]
1
2021-02-26T11:08:24.000Z
2021-02-26T11:08:24.000Z
code/Nuget/build.cmd
ogojack/speak.theming
bcb2257d01107d7934c9443a0c3a93eb9518eec3
[ "MIT" ]
2
2017-05-03T15:04:01.000Z
2021-02-26T11:07:54.000Z
nuget pack Sitecore.Speak.TypeScript.nuspec pause
24.5
43
0.877551
c3eabddbfa2a31491d2339636a56161fe2ca0873
3,405
bat
Batchfile
make.bat
knu2xs/oil-pad-deep-learning-demonstration
127307d41f701c23bafa6be9f4e1d16bb23af64d
[ "Apache-2.0" ]
null
null
null
make.bat
knu2xs/oil-pad-deep-learning-demonstration
127307d41f701c23bafa6be9f4e1d16bb23af64d
[ "Apache-2.0" ]
null
null
null
make.bat
knu2xs/oil-pad-deep-learning-demonstration
127307d41f701c23bafa6be9f4e1d16bb23af64d
[ "Apache-2.0" ]
null
null
null
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: LICENSING : ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: :: Copyright 2020 Esri :: :: Licensed under the Apache License, Version 2.0 (the "License"); You :: may not use this file except in compliance with the License. You may :: obtain a copy of the License at :: :: http://www.apache.org/licenses/LICENSE-2.0 :: :: Unless required by applicable law or agreed to in writing, software :: distributed under the License is distributed on an "AS IS" BASIS, :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or :: implied. See the License for the specific language governing :: permissions and limitations under the License. :: :: A copy of the license is available in the repository's :: LICENSE file. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: VARIABLES : ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: SETLOCAL SET PROJECT_DIR=%cd% SET PROJECT_NAME=oil-pad-detection SET ENV_NAME=oil-pad SET CONDA_PARENT=arcgispro-py3 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: COMMANDS : ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Jump to command GOTO %1 :: Perform data preprocessing steps contained in the make_data.py script. :data ENDLOCAL & ( CALL activate "%ENV_NAME%" CALL python scripts/make_data.py ECHO ^>^>^> Data processed. ) EXIT /B :: Export the current environment :env_export ENDLOCAL & ( CALL conda env export --name "%ENV_NAME%" > environment.yml ECHO ^>^>^> "%PROJECT_NAME%" conda environment exported to ./environment.yml ) EXIT /B :: Build the local environment from the environment file :env ENDLOCAL & ( :: Run this from the ArcGIS Python Command Prompt :: Clone and activate the new environment CALL conda create --name "%ENV_NAME%" --clone "%CONDA_PARENT%" CALL activate "%ENV_NAME%" :: Install nodejs so it does not throw an error later CALL conda install -y nodejs :: Install additional packages CALL conda env update -f environment.yml :: Install libtiff at a specific version with no dependencies per documentation conda install -y libtiff=4.0.10 --no-deps :: Additional steps for the map widget to work in Jupyter Lab CALL jupyter labextension install @jupyter-widgets/jupyterlab-manager -y CALL jupyter labextension install arcgis-map-ipywidget@1.8.1 -y :: Set the ArcGIS Pro Python environment proenv "%ENV_NAME%" ) EXIT /B :: Activate the environment :env_activate ENDLOCAL & CALL activate "%ENV_NAME%" EXIT /B :: Remove the environment :env_remove ENDLOCAL & ( CALL deactivate CALL conda env remove --name "%ENV_NAME%" -y ) EXIT /B :: Run jupyter lab :jupyter ENDLOCAL & ( CALL activate "%ENV_NAME%" CALL jupyter lab ) EXIT /B :: Run all tests in module :test ENDLOCAL & ( activate "%ENV_NAME%" pytest ) EXIT /B EXIT /B
30.132743
87
0.537739
c49121f52c1e7686e6f9f05854abed2851d28c1d
247
cmd
Batchfile
src/condor_tests/job_rsc_fcntl_std.cmd
neurodebian/htcondor
113a5c9921a4fce8a21e3ab96b2c1ba47441bf39
[ "Apache-2.0" ]
2
2018-06-18T23:11:20.000Z
2021-01-11T06:30:00.000Z
src/condor_tests/job_rsc_fcntl_std.cmd
neurodebian/htcondor
113a5c9921a4fce8a21e3ab96b2c1ba47441bf39
[ "Apache-2.0" ]
1
2021-04-06T04:19:40.000Z
2021-04-06T04:19:40.000Z
src/condor_tests/job_rsc_fcntl_std.cmd
neurodebian/htcondor
113a5c9921a4fce8a21e3ab96b2c1ba47441bf39
[ "Apache-2.0" ]
2
2017-11-09T01:42:58.000Z
2020-07-14T20:20:05.000Z
universe = standard Executable = job_rsc_fcntl_std.cndr.exe.$$(OPSYS).$$(ARCH) output = job_rsc_fcntl_std.out error = job_rsc_fcntl_std.err log = job_rsc_fcntl_std.log arguments = -_condor_aggravate_bugs priority = 0 Notification = Never queue
20.583333
58
0.789474
d829f63fe6e1b18c814f3d42b0641427cb4337d1
101
bat
Batchfile
start-local.bat
uid4oe/go-microservices-with-grpc
06e8750adfb7411b8ab93c8ac73d1262213403ff
[ "MIT" ]
120
2021-08-16T21:44:58.000Z
2022-03-31T13:27:55.000Z
start-local.bat
uid4oe/go-microservices-with-grpc
06e8750adfb7411b8ab93c8ac73d1262213403ff
[ "MIT" ]
null
null
null
start-local.bat
uid4oe/go-microservices-with-grpc
06e8750adfb7411b8ab93c8ac73d1262213403ff
[ "MIT" ]
8
2021-08-21T22:01:38.000Z
2022-02-15T11:34:12.000Z
cd bff start go run main.go cd .. cd user start go run main.go cd .. cd advice start go run main.go
11.222222
20
0.70297
67d419e433ab9ee997e10828c2d2cee4e011ab43
2,701
bat
Batchfile
NuGet/Pack.bat
X10sions/linq2db
14c22fb51ce2ab80c7a5aa3ba2e52559f5d207ae
[ "MIT" ]
2,291
2015-01-08T20:09:35.000Z
2022-03-30T07:05:17.000Z
NuGet/Pack.bat
X10sions/linq2db
14c22fb51ce2ab80c7a5aa3ba2e52559f5d207ae
[ "MIT" ]
2,761
2015-01-05T05:28:18.000Z
2022-03-31T21:05:21.000Z
NuGet/Pack.bat
X10sions/linq2db
14c22fb51ce2ab80c7a5aa3ba2e52559f5d207ae
[ "MIT" ]
514
2015-01-08T15:04:06.000Z
2022-03-24T20:43:02.000Z
rmdir ..\BuiltNuGet\built /S /Q md ..\BuiltNuGet\built IF [%1] EQU [snupkg] ( nuget.exe Pack ..\BuiltNuGet\linq2db.nuspec -OutputDirectory ..\BuiltNuGet\built -Symbols -SymbolPackageFormat snupkg nuget.exe Pack ..\BuiltNuGet\linq2db.AspNet.nuspec -OutputDirectory ..\BuiltNuGet\built -Symbols -SymbolPackageFormat snupkg nuget.exe Pack ..\BuiltNuGet\linq2db.Tools.nuspec -OutputDirectory ..\BuiltNuGet\built -Symbols -SymbolPackageFormat snupkg ) ELSE ( REM Azure Artifacts doesn't support snupkg yet/still REM https://developercommunity.visualstudio.com/idea/657354/add-snupkg-support-to-azure-devops-artifacts.html nuget.exe Pack ..\BuiltNuGet\linq2db.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.AspNet.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.Tools.nuspec -OutputDirectory ..\BuiltNuGet\built ) nuget.exe Pack ..\BuiltNuGet\linq2db.Access.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.DB2.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.DB2.Core.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.Firebird.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.Informix.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.Informix.Core.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.MySql.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.MySqlConnector.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.Oracle.Managed.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.Oracle.Unmanaged.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.PostgreSQL.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.SapHana.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.SqlCe.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.SQLite.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.SQLite.MS.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.SqlServer.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.SqlServer.MS.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.Sybase.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.Sybase.DataAction.nuspec -OutputDirectory ..\BuiltNuGet\built nuget.exe Pack ..\BuiltNuGet\linq2db.t4models.nuspec -OutputDirectory ..\BuiltNuGet\built
75.027778
124
0.805998
ce3a4dc2a986959f2d235956318c5475c1ce27d2
126
cmd
Batchfile
aspnet/web-api/overview/odata-support-in-aspnet-web-api/odata-v4/odata-actions-and-functions/samples/sample7.cmd
crowchirp/aspnet-docs
68bd479a394f6660934c9560821c70ad831d0ef7
[ "CC-BY-4.0", "MIT" ]
159
2020-02-20T05:22:34.000Z
2022-03-29T12:07:40.000Z
aspnet/web-api/overview/odata-support-in-aspnet-web-api/odata-v4/odata-actions-and-functions/samples/sample7.cmd
crowchirp/aspnet-docs
68bd479a394f6660934c9560821c70ad831d0ef7
[ "CC-BY-4.0", "MIT" ]
130
2020-02-20T15:57:30.000Z
2022-03-25T03:49:08.000Z
aspnet/web-api/overview/odata-support-in-aspnet-web-api/odata-v4/odata-actions-and-functions/samples/sample7.cmd
crowchirp/aspnet-docs
68bd479a394f6660934c9560821c70ad831d0ef7
[ "CC-BY-4.0", "MIT" ]
672
2020-02-20T07:49:28.000Z
2022-03-31T13:37:20.000Z
POST http://localhost/Products(1)/ProductService.Rate HTTP/1.1 Content-Type: application/json Content-Length: 12 {"Rating":5}
25.2
62
0.777778
cd3ba5d439db431b519bceb24b3f933841c65dfd
270
bat
Batchfile
Set_Keys.bat
voidgraph/OpenSSLHelper
7192c1cecd5fba4c716d091f2780915b8b563152
[ "MIT" ]
null
null
null
Set_Keys.bat
voidgraph/OpenSSLHelper
7192c1cecd5fba4c716d091f2780915b8b563152
[ "MIT" ]
null
null
null
Set_Keys.bat
voidgraph/OpenSSLHelper
7192c1cecd5fba4c716d091f2780915b8b563152
[ "MIT" ]
null
null
null
:: file name of AES-256 (Hex format) in Keys/ dir set AES_ENC_KEY=AES_256.hex :: file name of RSA private key (PEM format) in Keys/ dir set RSA_SIGN_KEY=PRIVATE_RSA_4096.pem :: file name of RSA public key (PEM format) in Keys/ dir set RSA_VERIFY_KEY=PUBLIC_RSA_4096.pem
45
57
0.77037
a0c224d2a254f8dbf13aedcd3ffd42e06934bd7e
55
cmd
Batchfile
scripts/extract-and-upload.cmd
Kefff/TotovBuilder.ResourcesExtractor
1da6703c5c9343431edb528bef0c731151af11dd
[ "MIT" ]
null
null
null
scripts/extract-and-upload.cmd
Kefff/TotovBuilder.ResourcesExtractor
1da6703c5c9343431edb528bef0c731151af11dd
[ "MIT" ]
null
null
null
scripts/extract-and-upload.cmd
Kefff/TotovBuilder.ResourcesExtractor
1da6703c5c9343431edb528bef0c731151af11dd
[ "MIT" ]
null
null
null
..\publish\TotovBuilder.ResourcesExtractor.exe -u pause
27.5
49
0.836364
789e7f1b7e8666f6db0b0b46eef555ca299811a4
145
bat
Batchfile
vioserial/buildAll.bat
kostyanf14/kvm-guest-drivers-windows
44dcbda7200489316828ce078349f012de2a7da3
[ "BSD-3-Clause" ]
982
2017-02-15T13:50:13.000Z
2022-03-31T12:19:54.000Z
vioserial/buildAll.bat
kostyanf14/kvm-guest-drivers-windows
44dcbda7200489316828ce078349f012de2a7da3
[ "BSD-3-Clause" ]
373
2017-02-15T13:43:58.000Z
2022-03-31T12:13:07.000Z
vioserial/buildAll.bat
kostyanf14/kvm-guest-drivers-windows
44dcbda7200489316828ce078349f012de2a7da3
[ "BSD-3-Clause" ]
219
2017-02-21T19:09:04.000Z
2022-03-11T12:53:07.000Z
@echo off call ..\tools\build.bat vioser.sln "Win8 Win10" %* if errorlevel 1 goto :eof call ..\tools\build.bat sys\vioser.vcxproj "Win10_SDV" %*
29
57
0.717241
633f1afa2d48daf49c70a5334e83600c8501f048
146
bat
Batchfile
manual-testing/issues/61/06_test-issue-61.bat
semantic-conflicts/elasticsearch-river-mongodb
d778375a349f70968a7fe4f6e50b461234eac06e
[ "Apache-2.0" ]
630
2015-01-01T22:05:23.000Z
2022-03-31T13:58:45.000Z
manual-testing/issues/61/06_test-issue-61.bat
semantic-conflicts/elasticsearch-river-mongodb
d778375a349f70968a7fe4f6e50b461234eac06e
[ "Apache-2.0" ]
157
2015-01-01T10:34:01.000Z
2021-04-16T07:49:48.000Z
manual-testing/issues/61/06_test-issue-61.bat
semantic-conflicts/elasticsearch-river-mongodb
d778375a349f70968a7fe4f6e50b461234eac06e
[ "Apache-2.0" ]
172
2015-01-03T01:32:05.000Z
2022-03-31T13:58:47.000Z
%MONGO_HOME%\bin\mongo --port 27018 local -u local -p local < test-issue-61.js pause curl -XGET localhost:9200/mydb61/_search?q=firstName:John-61
36.5
78
0.767123
6bdf3fcc0d2130b02886ecb290202b993da68974
308
bat
Batchfile
Feather/funWithRotaryEncoders/undeploy.bat
jquintus/PiProject
a11845ee52a7ef90b3951a6f7d101c5230bce577
[ "MIT" ]
1
2021-07-18T03:39:59.000Z
2021-07-18T03:39:59.000Z
Feather/funWithRotaryEncoders/undeploy.bat
jquintus/PiProject
a11845ee52a7ef90b3951a6f7d101c5230bce577
[ "MIT" ]
9
2019-04-20T20:04:53.000Z
2020-03-02T00:27:44.000Z
Feather/funWithRotaryEncoders/undeploy.bat
jquintus/PiProject
a11845ee52a7ef90b3951a6f7d101c5230bce577
[ "MIT" ]
null
null
null
@ECHO OFF REM ************************************ REM Pulls the code file from the board REM REM This is useful if you've been writing REM and debugging code directly to a REM CircuitPython board and now want REM to check it in to git REM ************************************ copy /Y d:\code.py .\code.py
25.666667
41
0.577922
54409368e23771b345b2d8a944c12ee6f7b1ec7f
643
bat
Batchfile
testbed/build.bat
Bizubani/ZeitGeist
b3675775a328ed1c41caf58e50374dede2d07d30
[ "Apache-2.0" ]
null
null
null
testbed/build.bat
Bizubani/ZeitGeist
b3675775a328ed1c41caf58e50374dede2d07d30
[ "Apache-2.0" ]
null
null
null
testbed/build.bat
Bizubani/ZeitGeist
b3675775a328ed1c41caf58e50374dede2d07d30
[ "Apache-2.0" ]
null
null
null
REM Build script for the Zeit Geist tester. Will be replaced with cmake in the future @ECHO OFF REM Force variables to wait till execution time to give their values SetLocal EnableDelayedExpansion REM Get a list of all the .c files SET cFilenames= FOR /R %%f in (*.c) do ( SET cFilenames=!cFilenames! %%f ) ECHO "Files:" %cFilenames% SET assembly=testbed SET compilerFlags=-g REM -Wall -Werror SET includeFlags=-Isrc -I../engine/src/ SET linkerFlags=-L../bin/ -lengine.lib SET defines=-D_DEBUG -DZIMPORT ECHO "Building %assembly%%.." clang %cFilenames% %compilerFlags% -o ../bin/%assembly%.exe %defines% %includeFlags% %linkerFlags%
29.227273
98
0.741835
af7e800b12f0ed817a6922d7cd97dc4f563e6beb
235
bat
Batchfile
bicycles-api/collections/runners/bicyclesCollectionRunner.bat
alejandroquintero/testBicico
3a27eb74759396709f37d55d35e44706b9fabb5b
[ "MIT" ]
null
null
null
bicycles-api/collections/runners/bicyclesCollectionRunner.bat
alejandroquintero/testBicico
3a27eb74759396709f37d55d35e44706b9fabb5b
[ "MIT" ]
null
null
null
bicycles-api/collections/runners/bicyclesCollectionRunner.bat
alejandroquintero/testBicico
3a27eb74759396709f37d55d35e44706b9fabb5b
[ "MIT" ]
null
null
null
newman run C:\Users\Asistente\Documents\NetBeansProjects\bicico\bicycles-api\collections\postman_collectionBicycle.json -e C:\Users\Asistente\Documents\NetBeansProjects\bicico\bicycles-api\collections\postman_env.json --disable-unicode
235
235
0.868085
8b4ad310a922e07f3505a9370ff1b04e86a8ba61
71
bat
Batchfile
tests/resources/jmeter/jmeter-loader.bat
IamSaurabh1/taurus
928d44e30e6cd5b979e675bfdce4c1dbeb5d0eff
[ "Apache-2.0" ]
1,743
2015-03-30T20:56:03.000Z
2022-03-31T09:08:37.000Z
tests/resources/jmeter/jmeter-loader.bat
IamSaurabh1/taurus
928d44e30e6cd5b979e675bfdce4c1dbeb5d0eff
[ "Apache-2.0" ]
1,159
2015-04-01T08:25:53.000Z
2022-03-29T08:15:31.000Z
tests/resources/jmeter/jmeter-loader.bat
IamSaurabh1/taurus
928d44e30e6cd5b979e675bfdce4c1dbeb5d0eff
[ "Apache-2.0" ]
497
2015-03-31T21:05:18.000Z
2022-03-17T12:45:21.000Z
echo off set JMETER_PATH=%~dp0 python %JMETER_PATH%/jmeter-fake.py %*
14.2
38
0.746479
34d899a3dc15b2f101f07f43847c2a1507c30ea2
57
bat
Batchfile
recipe/deactivate.bat
conda-forge/khronos-opencl-icd-loader-feedstock
3299cfe46f0852770440a38678c60f7ddfa4d527
[ "BSD-3-Clause" ]
null
null
null
recipe/deactivate.bat
conda-forge/khronos-opencl-icd-loader-feedstock
3299cfe46f0852770440a38678c60f7ddfa4d527
[ "BSD-3-Clause" ]
27
2016-12-16T01:38:27.000Z
2022-01-04T23:53:57.000Z
recipe/deactivate.bat
conda-forge/khronos-opencl-icd-loader-feedstock
3299cfe46f0852770440a38678c60f7ddfa4d527
[ "BSD-3-Clause" ]
4
2016-11-03T13:56:32.000Z
2020-09-29T18:47:23.000Z
set "OCL_ICD_FILENAMES=%OCL_ICD_FILENAMES_CONDA_BACKUP%"
28.5
56
0.877193
e6440659692171268d6e8059d8265d31cf98cc3d
100
bat
Batchfile
install.bat
cnsheds/TitanHide
7651c6da28604f56597f6605c76a26ec190a6752
[ "MIT" ]
1,279
2016-06-28T19:17:37.000Z
2022-03-29T02:43:01.000Z
install.bat
cnsheds/TitanHide
7651c6da28604f56597f6605c76a26ec190a6752
[ "MIT" ]
60
2016-07-04T18:27:24.000Z
2021-09-11T08:12:48.000Z
install.bat
cnsheds/TitanHide
7651c6da28604f56597f6605c76a26ec190a6752
[ "MIT" ]
72
2016-07-23T00:39:49.000Z
2022-01-19T05:08:55.000Z
@echo off echo Run this to install the auto-format hook. copy hooks\pre-commit .git\hooks\pre-commit
33.333333
46
0.79
046bf8b0c51aceaba62f134c3c3fbfd570e46122
124
bat
Batchfile
src/main/scala/progscala2/toolslibs/secho.bat
oldbig/prog-scala-2nd-ed-code-examples
376ae743c3c77888a125ae351a5a3702fc73067c
[ "Apache-2.0" ]
3
2021-06-04T06:44:05.000Z
2021-07-25T01:20:59.000Z
src/main/scala/progscala2/toolslibs/secho.bat
oldbig/prog-scala-2nd-ed-code-examples
376ae743c3c77888a125ae351a5a3702fc73067c
[ "Apache-2.0" ]
null
null
null
src/main/scala/progscala2/toolslibs/secho.bat
oldbig/prog-scala-2nd-ed-code-examples
376ae743c3c77888a125ae351a5a3702fc73067c
[ "Apache-2.0" ]
1
2021-06-01T14:21:11.000Z
2021-06-01T14:21:11.000Z
::#! @echo off call scala %0 %* goto :eof ::!# print("You entered: ") argv.toList foreach { s => format("%s ", s) } println
13.777778
45
0.580645
2d1125cd76f46b71a9f69a085888d20944c925e0
75
bat
Batchfile
Deprecated/SoarPre8.6/soar/start-soar.bat
sleyzerzon/soar
74a6f32ba1be3a7b3ed4eac0b44b0f4b2e981f71
[ "Unlicense" ]
1
2016-04-01T04:02:28.000Z
2016-04-01T04:02:28.000Z
Deprecated/SoarPre8.6/soar/start-soar.bat
sleyzerzon/soar
74a6f32ba1be3a7b3ed4eac0b44b0f4b2e981f71
[ "Unlicense" ]
null
null
null
Deprecated/SoarPre8.6/soar/start-soar.bat
sleyzerzon/soar
74a6f32ba1be3a7b3ed4eac0b44b0f4b2e981f71
[ "Unlicense" ]
null
null
null
@echo off start ..\tcl-8.4.6\bin\wish84.exe init-soar-auto-create-agent.tcl
37.5
65
0.746667
461251773f953b184cd6bcd06895466843a822b8
27
bat
Batchfile
setup/get_id.bat
joshuadave143/vskdj
ec28494f94091c4ae91201cc116043c4ac9af44b
[ "MIT" ]
null
null
null
setup/get_id.bat
joshuadave143/vskdj
ec28494f94091c4ae91201cc116043c4ac9af44b
[ "MIT" ]
null
null
null
setup/get_id.bat
joshuadave143/vskdj
ec28494f94091c4ae91201cc116043c4ac9af44b
[ "MIT" ]
null
null
null
::@echo off ipconfig pause
6.75
11
0.740741
69b5dc064415dd2367fe7df2cc290bb5041fd8da
922
bat
Batchfile
env.example.bat
LVGwing/DT-TEST-01
cef4e812f6fbedd14a67ef34089c84eb244670ef
[ "MIT" ]
null
null
null
env.example.bat
LVGwing/DT-TEST-01
cef4e812f6fbedd14a67ef34089c84eb244670ef
[ "MIT" ]
null
null
null
env.example.bat
LVGwing/DT-TEST-01
cef4e812f6fbedd14a67ef34089c84eb244670ef
[ "MIT" ]
null
null
null
:: 下载代码到本地 :: 安装node(http://nodejs.cn/download/) :: 此批处理脚本为本地运行代码前设置环境变量时所需 :: 使用时先将本文件名改成env.bat :: 填入相应的值 ==需注意 % 要转义为 %%== :: 进入文件夹打开CMD :: npm run test_start 启动脚本 :: npm run test_check 检查是否中奖(只查看两个小时内的奖) :: npm run test_clear 清空动态和关注 :: 运行成功后在lib文件夹下会生成一个GlobalVar.json文件和dyid.txt文件 :: ==换参数时须先将GlobalVar.json文件删除== :: 如果要运行多账号只能复制本项目并依次独立运行 :: lib/Public.js getLotteryInfoByTag getLotteryInfoByUID中可适当增大扫描范围 :: ==注意运行时请去掉注释== set COOKIE= set NUMBER=1 set CLEAR= set LOCALLAUNCH=true set CLEAR=true :: 推送所需环境变量(可不填) :: 推送限制时间(小时) 默认为2 即只推送两小时内的中奖信息防止重复发送 set PUSH_LIMIT_TIME= set SCKEY= set SENDKEY= set QQ_SKEY= set QQ_MODE= set BARK_PUSH= set BARK_SOUND= set TG_BOT_TOKEN= set TG_USER_ID= set TG_PROXY_HOST= set TG_PROXY_PORT= set DD_BOT_TOKEN= set DD_BOT_SECRET= set QYWX_KEY= set IGOT_PUSH_KEY= set PUSH_PLUS_TOKEN= set PUSH_PLUS_USER= set SMTP_HOST= set SMTP_PORT= set SMTP_USER= set SMTP_PASS= set SMTP_TO_USER=
20.954545
66
0.786334
680f377cd5de39f0e21469d454f9a2163c57bf90
85
cmd
Batchfile
continuous_integration/test_script.cmd
jeremiedbb/threadpoolctl
e8c9dc6ebd5565a75284aed31beec2e439d4f80e
[ "BSD-3-Clause" ]
null
null
null
continuous_integration/test_script.cmd
jeremiedbb/threadpoolctl
e8c9dc6ebd5565a75284aed31beec2e439d4f80e
[ "BSD-3-Clause" ]
null
null
null
continuous_integration/test_script.cmd
jeremiedbb/threadpoolctl
e8c9dc6ebd5565a75284aed31beec2e439d4f80e
[ "BSD-3-Clause" ]
null
null
null
call activate %VIRTUALENV% pytest -vlrxXs --junitxml=%JUNITXML% --cov=threadpoolctl
21.25
56
0.776471
ce128b5525d620238ed678c56b1c74ff3397e6ed
2,210
bat
Batchfile
auto-embedded-google-drive-folders-heirchy_20210708160534.bat
KaiJayGit/dorf
40f8843b0ac0abef4daaf02150d8a9ce76b52dff
[ "Unlicense" ]
null
null
null
auto-embedded-google-drive-folders-heirchy_20210708160534.bat
KaiJayGit/dorf
40f8843b0ac0abef4daaf02150d8a9ce76b52dff
[ "Unlicense" ]
null
null
null
auto-embedded-google-drive-folders-heirchy_20210708160534.bat
KaiJayGit/dorf
40f8843b0ac0abef4daaf02150d8a9ce76b52dff
[ "Unlicense" ]
null
null
null
@echo off call rcdt.bat goto:0 for readibility -FpmitTs == pub/' 'inode/directory' '1YPS0OwUTj2Mx-njrHyJyy9hdL-qJtHpc' '2021-06-23 17:20:41' '' '-1 :0 set save=%~dp0_files-both-versions_and_dirs-embedding-practice_2021-07-08_%DT%.txt call :MASTER %* echo: echo:Fin echo: timeout 1333 >NUL exit /b :\ :MASTER setlocal enabledelayedexpansion call :TRIP_THREAT %* exit /b :TRIP_THREAT for /f "useback tokens=1* delims=;" %%A in (`fclone lsf 0AFy0hD6xXwL2Uk9PVA:pub -Fip`) do ( ( echo: echo:%%~nB if not "%%~nxB" == "" echo:typeA = https://lh3.googleusercontent.com/d/%%A if not "%%~nxB" == "" echo:typeB = https://drive.google.com/uc?export=view^&id=%%A if "%%~nxB" == "" echo:&echo:%%B - embedded grid&echo:https://drive.google.com/embeddedfolderview?id=%%A#grid )>>"%SAVE%" echo: echo:%%~nB if not "%%~nxB" == "" echo:typeA = https://lh3.googleusercontent.com/d/%%A if not "%%~nxB" == "" echo:typeB = https://drive.google.com/uc?export=view^&id=%%A if "%%~nxB" == "" echo:&echo:%%B - embedded grid&echo:https://drive.google.com/embeddedfolderview?id=%%A#grid ) exit /b >>fileTypeA.txt for /f "useback tokens=1* delims=;" %%A in (`fclone lsf 0AFy0hD6xXwL2Uk9PVA:pub -Fip`) do call :DORF "%%~A" "%%~B" :DORF echo:%2|find "/" && call :DIRS %* || call :FILES %* :METHODS :FILES_METHOD1 set "prepend_files1=https://lh3.googleusercontent.com/d/" set file1=%prepend_files1%%1&shift set file1_name=%2%3%4%5%6%7%8%9 :FILES_METHOD2 set "prepend_files2=https://drive.google.com/uc?export=view^^^&id=" set prepend2a=https://drive.google.com/uc set prepend2b=export set prepend2c=view set prependasdas= set file1=%prepend_files2%%1&shift set file1_name=%2%3%4%5%6%7%8%9 :DIRS_METHOD0 set "prepend_dirs=https://drive.google.com/embeddedfolderview^^^?id=" set "append_dirs=#grid" set "dirs=%prepend_dirs%%%A%append_dirs%" || exit /b :FOLDERS_STATIC for /f "useback tokens=1* delims=;" %%A in (`fclone lsf 0AFy0hD6xXwL2Uk9PVA:pub -Fip`) do @echo:&@if "%%~nxB" == "" @ECHO:%%~B&@echo:https://drive.google.com/embeddedfolderview?id=%%A#grid
19.051724
189
0.636652
84da9494f510f570de96cd0004602327c082aece
66
bat
Batchfile
Crawl_All.bat
MerGatto/DSA5RegelWikiParser
833e0737f358b96cc99e6e7ca213ece07761c35c
[ "MIT" ]
null
null
null
Crawl_All.bat
MerGatto/DSA5RegelWikiParser
833e0737f358b96cc99e6e7ca213ece07761c35c
[ "MIT" ]
null
null
null
Crawl_All.bat
MerGatto/DSA5RegelWikiParser
833e0737f358b96cc99e6e7ca213ece07761c35c
[ "MIT" ]
null
null
null
call Crawl_Magic.bat call Crawl_Abilities.bat call Crawl_Karma.bat
22
24
0.878788
d439195716f369be0135c81370050253a97fdacc
116
bat
Batchfile
6 - Making Docker Images/run.bat
NguyenAndrew/A-Simple-Docker-Tutorial
d492c678f77d1befec5505fb2282b79f78a89c0e
[ "MIT" ]
null
null
null
6 - Making Docker Images/run.bat
NguyenAndrew/A-Simple-Docker-Tutorial
d492c678f77d1befec5505fb2282b79f78a89c0e
[ "MIT" ]
null
null
null
6 - Making Docker Images/run.bat
NguyenAndrew/A-Simple-Docker-Tutorial
d492c678f77d1befec5505fb2282b79f78a89c0e
[ "MIT" ]
null
null
null
@ECHO OFF ECHO nodejs image. nodejs image docker build -t nodejs-app . docker run --rm -p 8080:3000 -d nodejs-app
16.571429
42
0.724138
be68c71216916a2794d38e9db61965e448131853
58
bat
Batchfile
dotfiles/optional/cmd.bat
ikeagold/999-gists-snippets-patterns
23912e658c67e8faeb323d449ff51ccf0edd14e9
[ "MIT" ]
19
2015-12-23T13:21:58.000Z
2021-01-10T19:53:24.000Z
dotfiles/optional/cmd.bat
ikeagold/999-gists-snippets-patterns
23912e658c67e8faeb323d449ff51ccf0edd14e9
[ "MIT" ]
null
null
null
dotfiles/optional/cmd.bat
ikeagold/999-gists-snippets-patterns
23912e658c67e8faeb323d449ff51ccf0edd14e9
[ "MIT" ]
7
2015-12-25T17:41:18.000Z
2017-11-03T16:32:48.000Z
@echo off cmd.exe /K "cd %userprofile%\Documents\GitHub"
14.5
46
0.724138
5105c56e3e19bda53868f5d34186bf0c2ea5788f
1,368
bat
Batchfile
examples/make.bat
LAK132/graphics-notebook
b7b04c416ba8c2dd9abc59c0e38a00f7d330e2aa
[ "Unlicense" ]
null
null
null
examples/make.bat
LAK132/graphics-notebook
b7b04c416ba8c2dd9abc59c0e38a00f7d330e2aa
[ "Unlicense" ]
null
null
null
examples/make.bat
LAK132/graphics-notebook
b7b04c416ba8c2dd9abc59c0e38a00f7d330e2aa
[ "Unlicense" ]
null
null
null
@echo off SetLocal EnableDelayedExpansion if "%1"=="clean" goto clean set target=%1 set program=%2 if not "%target%"=="x86" if not "%target%"=="x64" if not "%mode%"=="clean" goto useage if exist "vcvarsall.bat" ( call "vcvarsall.bat" %target% goto begin ) if exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" ( call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %target% goto begin ) if exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\Build\vscarsall.bat" ( call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\Build\vscarsall.bat" %target% goto begin ) if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" ( call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %target% goto begin ) set /p VCVARSALLBAT=vcvarsall.bat directory: call "%VCVARSALLBAT%" %target% :begin if not exist obj mkdir obj set CXX=cl /nologo /D_CRT_SECURE_NO_WARNINGS /MT /EHsc /bigobj /O2 /Fo:obj\ /Fd:obj\ set LINK_ARGS=/link call makelist.bat goto :eof :clean if exist obj rmdir /S /Q obj rm *.exe goto :eof :useage echo compile: "make [x86/x64] <program>" echo clean: "make clean" EndLocal
29.73913
114
0.731725
96577d7aba9ab8a544a8a9bd4e11e2118fcef3bd
193
cmd
Batchfile
env_reset.cmd
jfseb/mgnlq_testmodel_replay
1bf9c008dc7a43c7d2fa3f2f0ea75bd5ee72a624
[ "MIT" ]
null
null
null
env_reset.cmd
jfseb/mgnlq_testmodel_replay
1bf9c008dc7a43c7d2fa3f2f0ea75bd5ee72a624
[ "MIT" ]
null
null
null
env_reset.cmd
jfseb/mgnlq_testmodel_replay
1bf9c008dc7a43c7d2fa3f2f0ea75bd5ee72a624
[ "MIT" ]
null
null
null
SET MGNLQ_TESTMODEL_REPLAY= SET MGNLQ_RECORD_REPLAY= SET ABOT_MODELPATH= SET MGNLQ_MODEL_NO_FILECACHE=1 SET MONGO_DBURL= SET MGNLQ_MODELPATH= TITLE mgnql_model_env_plain COLOR 07
16.083333
31
0.813472
d789cdc2b81f695c3834cad5568144b58767e779
48
bat
Batchfile
nodeserver.bat
DanyZurita/nodeserver
55dedd3161220e2e42dcbf2d38e7cffb22e53672
[ "MIT" ]
null
null
null
nodeserver.bat
DanyZurita/nodeserver
55dedd3161220e2e42dcbf2d38e7cffb22e53672
[ "MIT" ]
null
null
null
nodeserver.bat
DanyZurita/nodeserver
55dedd3161220e2e42dcbf2d38e7cffb22e53672
[ "MIT" ]
null
null
null
node nodeserver.js npm install --express --save
16
28
0.770833
13d26040034f076975388d5c3ee3b4398845eb16
55
bat
Batchfile
gitpush.bat
huanlin/csharp-book-support
8efb8b41d4580ac693e101cf83e99b0497a087be
[ "MIT" ]
10
2015-05-20T08:55:52.000Z
2021-10-06T05:09:43.000Z
gitpush.bat
huanlin/csharp-book-support
8efb8b41d4580ac693e101cf83e99b0497a087be
[ "MIT" ]
null
null
null
gitpush.bat
huanlin/csharp-book-support
8efb8b41d4580ac693e101cf83e99b0497a087be
[ "MIT" ]
14
2016-04-22T09:15:27.000Z
2021-12-17T05:29:02.000Z
git add -A git commit -m "improve" git push git status
11
23
0.727273
de773f586b0fe55aa07fe73fc5306ed5dfa2a2c8
930
cmd
Batchfile
build.cmd
saqibk123/test
b8d7e0228456269c823a0c229c1adbf91ecb9e73
[ "Apache-2.0" ]
null
null
null
build.cmd
saqibk123/test
b8d7e0228456269c823a0c229c1adbf91ecb9e73
[ "Apache-2.0" ]
null
null
null
build.cmd
saqibk123/test
b8d7e0228456269c823a0c229c1adbf91ecb9e73
[ "Apache-2.0" ]
null
null
null
call mvn clean package rd "C:\openfire_4_1_6\plugins\ofmeet" /q /s rd "C:\openfire_4_1_6\plugins\ofocus" /q /s rd "C:\openfire_4_1_6\plugins\ofswitch" /q /s rd "C:\openfire_4_1_6\plugins\ofchat" /q /s del "C:\openfire_4_1_6\plugins\ofmeet.jar" del "C:\openfire_4_1_6\plugins\ofocus.jar" del "C:\openfire_4_1_6\plugins\ofswitch.jar" del "C:\openfire_4_1_6\plugins\ofchat.jar" copy C:\Projects\ignite\ofmeet-openfire-plugin-dele\ofmeet\target\ofmeet.jar "C:\openfire_4_1_6\plugins" copy C:\Projects\ignite\ofmeet-openfire-plugin-dele\offocus\target\ofocus.jar "C:\openfire_4_1_6\plugins" copy C:\Projects\ignite\ofmeet-openfire-plugin-dele\ofswitch\target\ofswitch.jar "C:\openfire_4_1_6\plugins" copy C:\Projects\ignite\ofmeet-openfire-plugin-dele\ofchat\target\ofchat.jar "C:\openfire_4_1_6\plugins" rd /s /q C:\Projects\ignite\ofmeet-openfire-plugin-dele\ofswitch\classes\jitsi-meet del "C:\openfire_4_1_6\logs\*.*" pause
46.5
108
0.784946
8b8d6de84c6c635ce9aeb0e042cf568d2f363556
639
bat
Batchfile
build.bat
MetaDevo/treefrog-framework
3f340af5207e6dd3744f383a95658cb210f98350
[ "BSD-3-Clause" ]
null
null
null
build.bat
MetaDevo/treefrog-framework
3f340af5207e6dd3744f383a95658cb210f98350
[ "BSD-3-Clause" ]
null
null
null
build.bat
MetaDevo/treefrog-framework
3f340af5207e6dd3744f383a95658cb210f98350
[ "BSD-3-Clause" ]
null
null
null
@ECHO OFF @setlocal :: :: Edit this line to run the batch file for Qt environment. :: ::call "C:\Qt\5.9.3\mingw53_32\bin\qtenv2.bat" ::call "C:\Qt\5.9.3\msvc2015_64\bin\qtenv2.bat" ::call "C:\Qt\5.9.3\msvc2017_64\bin\qtenv2.bat" ::call "C:\Qt\5.10.0\mingw53_32\bin\qtenv2.bat" ::call "C:\Qt\5.10.0\msvc2015_64\bin\qtenv2.bat" call "C:\Qt\5.11.0\msvc2017_64\bin\qtenv2.bat" ::call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 cd /D %~dp0 call compile_install.bat pause exit /b
30.428571
108
0.699531
da0023da4de78f63868f89f7b4e68ead4a1d0575
20
bat
Batchfile
makefiles/debug_quick.bat
Kochise/makeit
2e4f4e0da653a69f2d62c45a4d2f1dc66e93f4c9
[ "MIT" ]
2
2018-12-08T20:03:34.000Z
2021-03-23T20:16:30.000Z
makefiles/debug_quick.bat
Kochise/makeit
2e4f4e0da653a69f2d62c45a4d2f1dc66e93f4c9
[ "MIT" ]
null
null
null
makefiles/debug_quick.bat
Kochise/makeit
2e4f4e0da653a69f2d62c45a4d2f1dc66e93f4c9
[ "MIT" ]
null
null
null
makeit quick debug
10
19
0.8
baeddf22af7364c66b6392b5f8974108aa565520
2,228
bat
Batchfile
afterhours/compile.bat
mattixpet/web-afterhours
c8402c92726cca20450c1a005a2e611c44e31a04
[ "Apache-2.0" ]
null
null
null
afterhours/compile.bat
mattixpet/web-afterhours
c8402c92726cca20450c1a005a2e611c44e31a04
[ "Apache-2.0" ]
null
null
null
afterhours/compile.bat
mattixpet/web-afterhours
c8402c92726cca20450c1a005a2e611c44e31a04
[ "Apache-2.0" ]
null
null
null
::compile.bat ::compiles jade files and stylus files into .html and .css ::from afterhours folder @echo off & setlocal enabledelayedexpansion ::jade index echo executing command: jade templates/index.jade -o "../site/afterhours" -P call jade templates/index.jade -o "../site/afterhours" -P ::jade about echo executing command: jade templates/about.jade -o "../site/afterhours" -P call jade templates/about.jade -o "../site/afterhours" -P ::jade contact echo executing command: jade templates/contact.jade -o "../site/afterhours" -P call jade templates/contact.jade -o "../site/afterhours" -P ::stylus!!! echo executing command: stylus styles/style.styl -o "../site/afterhours/css/" call stylus styles/style.styl -o "../site/afterhours/css/" ::move to ../site/afterhours directory, lets not change html files elsewhere echo. & echo executing command: cd site call cd ../site/afterhours ::first, delete all old .php files, to be ready for the renaming of html files to .php echo. & echo deleting old .php files.. ::ignore files that exist only as .php files, like the language files set ignores= none.php echo php files to ignore: for %%i in (%ignores%) do echo %%i echo. for /r %%d in (*.php) do ( set inIgnores= 0 for %%i in (%ignores%) do ( :: %%~nd%%~xd means just name.extension, a cleaner way than this probably exists.. if "%%i" == "%%~nd%%~xd" ( set inIgnores= 1 ) ) if !inIgnores! lss 1 ( echo %%d rm %%d ) else ( echo ignoring file %%d ) ) echo files deleted & echo. ::now rename all .html files to .php for our viewing pleasures echo renaming .html to .php set htmlignores= index.html echo html files to ignore: for %%i in (%htmlignores%) do echo %%i echo. for /r %%d in (*.html) do ( set inIgnores= 0 for %%i in (%htmlignores%) do ( :: %%~nd%%~xd means just name.extension, a cleaner way than this probably exists.. if "%%i" == "%%~nd%%~xd" ( set inIgnores= 1 ) ) if !inIgnores! lss 1 ( echo %%d ren "%%~d" *.php ) else ( echo ignoring file %%d ) ) echo files renamed & echo. echo special case, rename index.html in root ren "%~dp0\..\site\afterhours\index.html" "index.php" echo %~dp0%\..\site\afterhours\index.html renamed
28.935065
86
0.671005
5e3cd34bb7bb13c05811b2ff6bb11d46d2126f80
90
bat
Batchfile
SignatureRead.bat
anhtuantt/XMLDSig
e3b329c50b1280ec8d448478dc5d86d3ed832c2e
[ "MIT" ]
1
2018-08-09T12:09:08.000Z
2018-08-09T12:09:08.000Z
SignatureRead.bat
anhtuantt/XMLDSig
e3b329c50b1280ec8d448478dc5d86d3ed832c2e
[ "MIT" ]
null
null
null
SignatureRead.bat
anhtuantt/XMLDSig
e3b329c50b1280ec8d448478dc5d86d3ed832c2e
[ "MIT" ]
null
null
null
java -cp bin;lib/* com.clinys.xml.digitalsignature.SignatureReadInfo XMLPOC_Signed_v01.xml
90
90
0.855556
5ffb565a871aaa5c56f2368d04f06ffb8607ebef
1,001
cmd
Batchfile
7zSFX/NET35.cmd
abbodi1406/dotNetFx35W10
c74013dd8995bc206229cb1df1b9b027c8a672a7
[ "Unlicense" ]
60
2019-05-28T10:28:17.000Z
2022-03-14T18:11:52.000Z
7zSFX/NET35.cmd
abbodi1406/dotNetFx35W10
c74013dd8995bc206229cb1df1b9b027c8a672a7
[ "Unlicense" ]
1
2021-09-22T07:05:54.000Z
2021-09-23T09:35:45.000Z
7zSFX/NET35.cmd
abbodi1406/dotNetFx35W10
c74013dd8995bc206229cb1df1b9b027c8a672a7
[ "Unlicense" ]
6
2019-09-06T23:35:20.000Z
2021-07-14T01:16:26.000Z
@echo off set "SysPath=%Windir%\System32" if exist "%Windir%\Sysnative\reg.exe" set "SysPath=%Windir%\Sysnative" set "Path=%SysPath%;%Windir%;%SysPath%\Wbem" for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G if %winbuild% LSS 10240 ( if not "%1"=="" goto :eof echo ==== ERROR ==== echo This package is only for Windows 10 echo Press any Key to Exit. pause >nul goto :eof ) set arch=x64 if /i "%PROCESSOR_ARCHITECTURE%"=="x86" ( if "%PROCESSOR_ARCHITEW6432%"=="" set arch=x86 ) cd /d "%~dp0" if %winbuild% LSS 17763 ( set "source=%arch%\17763\update.mum" ) if %winbuild% GEQ 17763 ( set "source=%arch%\17763\update.mum" ) if %winbuild% GEQ 18362 ( set "source=%arch%\18362\update.mum" ) if %winbuild% GEQ 19041 ( set "source=%arch%\19041\update.mum" ) echo. DISM.exe /Online /NoRestart /Add-Package /PackagePath:"%source%" echo. echo ============================================================ echo. if not "%1"=="" goto :eof echo Press any Key to Exit. pause >nul goto :eof
25.666667
70
0.632368
4f6a7964ab7b802c30ace46a1a1d05719f9e22c0
494
bat
Batchfile
scripts/windows/coco-dev-setup/batch/scripts/npm_and_brunch_setup.bat
rishiloyola/codecombat
6a26681fec84f2273c44d85dea3fd928bb4ee87b
[ "MIT" ]
1
2021-01-09T23:57:54.000Z
2021-01-09T23:57:54.000Z
scripts/windows/coco-dev-setup/batch/scripts/npm_and_brunch_setup.bat
rishiloyola/codecombat
6a26681fec84f2273c44d85dea3fd928bb4ee87b
[ "MIT" ]
null
null
null
scripts/windows/coco-dev-setup/batch/scripts/npm_and_brunch_setup.bat
rishiloyola/codecombat
6a26681fec84f2273c44d85dea3fd928bb4ee87b
[ "MIT" ]
2
2020-10-28T14:50:54.000Z
2020-11-05T12:39:19.000Z
call print_npm_and_brunch_header call print_dashed_seperator set work_directory=%CD% set "curl_app=..\utilities\curl.exe" set "zu_app=..\utilities\7za.exe" set coco_root=%repository_path%\coco set coco_db=%repository_path%\cocodb call nab_install_npm %coco_root% call nab_install_bower %coco_root% call nab_install_sass %coco_root% call nab_install_npm_all %coco_root% call nab_install_mongodb %coco_db% call nab_automatic_script.bat %coco_root% %coco_db% call print_dashed_seperator
19.76
51
0.823887
9dfdefc9bdc73e3e521ed69e9bc466438d8a84d7
1,153
bat
Batchfile
tools/wheels/build-wheels.bat
ffissore/confluent-kafka-python
7d7be24efbe797a4249517756f3d0c7e6fcc6ad7
[ "Apache-2.0" ]
1
2022-02-16T10:37:04.000Z
2022-02-16T10:37:04.000Z
tools/wheels/build-wheels.bat
ffissore/confluent-kafka-python
7d7be24efbe797a4249517756f3d0c7e6fcc6ad7
[ "Apache-2.0" ]
null
null
null
tools/wheels/build-wheels.bat
ffissore/confluent-kafka-python
7d7be24efbe797a4249517756f3d0c7e6fcc6ad7
[ "Apache-2.0" ]
null
null
null
@echo off SETLOCAL ENABLEEXTENSIONS rem x86 or x64 set ARCH=%1 rem win32 or win_amd64 set BW_ARCH=%2 rem librdkafka install destdir (relative path) set DEST=%3 rem wheelhouse output dir set WHEELHOUSE=%4 if [%WHEELHOUSE%]==[] goto usage echo on set CIBW_BUILD=cp36-%BW_ARCH% cp37-%BW_ARCH% cp38-%BW_ARCH% cp39-%BW_ARCH% set CIBW_BEFORE_BUILD=python -m pip install delvewheel==0.0.6 set CIBW_TEST_REQUIRES=-r tests/requirements.txt set CIBW_TEST_COMMAND=pytest {project}\tests\test_Producer.py rem set CIBW_BUILD_VERBOSITY=3 set include=%cd%\%DEST%\build\native\include set lib=%cd%\%DEST%\build\native\lib\win\%ARCH%\win-%ARCH%-Release\v140 set DLL_DIR=%cd%\%DEST%\runtimes\win-%ARCH%\native set CIBW_REPAIR_WHEEL_COMMAND=python -m delvewheel repair --add-path %DLL_DIR% -w {dest_dir} {wheel} set PATH=%PATH%;c:\Program Files\Git\bin\ python -m pip install cibuildwheel==1.11.0 || goto :error python -m cibuildwheel --output-dir %WHEELHOUSE% --platform windows || goto :error dir %WHEELHOUSE% goto :eof :usage @echo "Usage: %0 x86|x64 win32|win_amd64 wheelhouse-dir" exit /B 1 :error echo Failed with error #%errorlevel%. exit /b %errorlevel%
26.813953
100
0.760624
fe0759985ab16d8142bc334a10d2f20cd1e1eb6b
2,364
bat
Batchfile
app/Generic/_sequence/01-rapid/rapid.bat
mirage335/extendedInterface
b22c3a07f046b11850e7846ab00dc748c211d25f
[ "CC0-1.0" ]
5
2020-01-12T00:42:03.000Z
2021-09-21T13:46:19.000Z
app/Generic/_sequence/01-rapid/rapid.bat
mirage335/extendedInterface
b22c3a07f046b11850e7846ab00dc748c211d25f
[ "CC0-1.0" ]
null
null
null
app/Generic/_sequence/01-rapid/rapid.bat
mirage335/extendedInterface
b22c3a07f046b11850e7846ab00dc748c211d25f
[ "CC0-1.0" ]
null
null
null
REM Depends: REM 'mswadminpriv.bat' - 'nircmd elevate' REM ***** REM VirtualDesktop should usually be configured to work acceptably well with any configuration. REM (ie. do not push VirtualDesktop's own supersampling to >2.52x Total SR or less depending on hardware) REM Terminate - VoiceAttack (Ensure correct microphone is available and used.) CALL C:\core\infrastructure\extendedInterface\support\voiceattack\terminate_voiceattack.bat REM 015-VoiceAttack - AS ADMIN cd "C:\Program Files (x86)\VoiceAttack" CALL "C:\bin\mswadminpriv.bat" cmd.exe /C start /MIN /D "C:\Program Files (x86)\VoiceAttack" "" "C:\Program Files (x86)\VoiceAttack\VoiceAttack.exe" REM 005-EVGA Precision X1 (if installed) cd "C:\Program Files\EVGA\Precision X1" tasklist /nh /fi "imagename eq PrecisionX_x64.exe" | find /i "PrecisionX_x64.exe" > nul || (start /MIN "" "C:\Program Files\EVGA\Precision X1\PrecisionX_x64.exe" 0) REM 008-Steam echo prepare - steam @echo off setlocal disableDelayedExpansion :Variables set InputFile=config\loginusers.vdf set OutputFile=config\loginusers-temp.vdf set "_strFind0= "WantsOfflineMode" "0"" set "_strReplace0= "WantsOfflineMode" "1"" set "_strFind1= "SkipOfflineModeWarning" "0"" set "_strReplace1= "SkipOfflineModeWarning" "1"" :Replace >"%OutputFile%" ( for /f "usebackq delims=" %%A in ("%InputFile%") do ( if "%%A" equ "%_strFind0%" (echo %_strReplace0%) else if "%%A" equ "%_strFind1%" (echo %_strReplace1%) else (echo %%A) ) ) MOVE "%OutputFile%" "%InputFile%" @echo on REM start "" "C:\Program Files (x86)\Steam\Steam.exe" -silent tasklist /nh /fi "imagename eq Steam.exe" | find /i "Steam.exe" > nul || (start "" "C:\Program Files (x86)\Steam\Steam.exe" -silent) REM 008-Steam-SteamVR-OPTIONAL REM Terminate - SteamVR (Ensure video parameter changes take effect.) REM CALL C:\core\infrastructure\extendedInterface\support\steamvr\terminate_steamvr.bat REM start "" "steam://rungameid/250820" tasklist /nh /fi "imagename eq vrmonitor.exe" | find /i "vrmonitor.exe" > nul || (start "" "steam://rungameid/250820") timeout /NOBREAK 7 REM 080-VirtualDesktop REM tasklist /nh /fi "imagename eq Virtual Desktop.exe" | find /i "Virtual Desktop.exe" > nul || (start "" "steam://rungameid/382110") start "" "steam://rungameid/382110" timeout 3 start "" cmd /c "echo ***** RAPID COMPLETE ***** &echo(&timeout 10"
36.9375
164
0.728003
46521901392444e927d448d43b7cf7ec81b1b88d
489
bat
Batchfile
digsby/windist.bat
ifwe/digsby
f5fe00244744aa131e07f09348d10563f3d8fa99
[ "Python-2.0" ]
35
2015-08-15T14:32:38.000Z
2021-12-09T16:21:26.000Z
digsby/windist.bat
niterain/digsby
16a62c7df1018a49eaa8151c0f8b881c7e252949
[ "Python-2.0" ]
4
2015-09-12T10:42:57.000Z
2017-02-27T04:05:51.000Z
digsby/windist.bat
niterain/digsby
16a62c7df1018a49eaa8151c0f8b881c7e252949
[ "Python-2.0" ]
15
2015-07-10T23:58:07.000Z
2022-01-23T22:16:33.000Z
rem rem builds a Digsby windows installer rem set DIGSBY_INSTALLER_DIR=build\msw\DigsbyInstaller set DIGSBY_LAUNCHER_DIR=c:\dev\digsby-launcher\bin rem update all sources svn up pushd %DIGSBY_INSTALLER_DIR% svn up popd pushd %DIGSBY_LAUNCHER_DIR% svn up popd rem make the distribution and installer call dpy makedist.py -p package.py %1 %2 %3 %4 %5 %6 rem copy installers over to mini copy dist\digsby_setup*.exe \\192.168.1.100\mike /Y rem pushd build\msw rem call ss.bat rem popd
17.464286
52
0.787321
cbfd8cae6816e1e18e9be07da111a9921369fec5
22
bat
Batchfile
_jekyll_serve.bat
elizabethmyles/elizabethmyles.github.io
de104867dbdef5ad0c3a19c85df0a03d1b964537
[ "CC-BY-3.0" ]
1
2015-01-29T07:24:59.000Z
2015-01-29T07:24:59.000Z
_jekyll_serve.bat
elizabethmyles/elizabethmyles.github.io
de104867dbdef5ad0c3a19c85df0a03d1b964537
[ "CC-BY-3.0" ]
null
null
null
_jekyll_serve.bat
elizabethmyles/elizabethmyles.github.io
de104867dbdef5ad0c3a19c85df0a03d1b964537
[ "CC-BY-3.0" ]
null
null
null
@ECHO OFF jekyll serve
11
12
0.818182
01a969e56ff0553ada9af04b62bd0e6ac2206d90
51
bat
Batchfile
src/tools/api_compiler/run-script-template.bat
facade-technologies-inc/facile
4c9134dced71734641fed605e152880cd9ddefe3
[ "MIT" ]
2
2020-09-17T20:51:18.000Z
2020-11-03T15:58:10.000Z
src/tools/api_compiler/run-script-template.bat
facade-technologies-inc/facile
4c9134dced71734641fed605e152880cd9ddefe3
[ "MIT" ]
97
2020-08-26T05:07:08.000Z
2022-03-28T16:01:49.000Z
src/tools/api_compiler/run-script-template.bat
facade-technologies-inc/facile
4c9134dced71734641fed605e152880cd9ddefe3
[ "MIT" ]
null
null
null
@echo OFF "{interpreterLocation}" automate.py pause
17
35
0.803922
81b1ee5d7b975e99dcc9ec0d51cd171ce62b6dc1
106
cmd
Batchfile
cmd/test/test-interpret_file.cmd
tydaeus/utility
4c140c4c15842ceaccb7bb0cbfa650ddc2869fe9
[ "CC-BY-4.0" ]
1
2018-06-19T12:32:28.000Z
2018-06-19T12:32:28.000Z
cmd/test/test-interpret_file.cmd
tydaeus/utility
4c140c4c15842ceaccb7bb0cbfa650ddc2869fe9
[ "CC-BY-4.0" ]
14
2019-11-14T21:37:21.000Z
2022-03-25T18:45:20.000Z
cmd/test/test-interpret_file.cmd
tydaeus/utility
4c140c4c15842ceaccb7bb0cbfa650ddc2869fe9
[ "CC-BY-4.0" ]
null
null
null
@echo off setLocal enableDelayedExpansion set PATH=..\util;%PATH% call interpret_file test.script pause
13.25
31
0.801887
85823d0e045885f3e0fbb50132ca9a86e0004995
91
bat
Batchfile
install.bat
natlachaman/rASR-toolbox
ce48f363ca3fed96d3ce4e1f98e8ee2ff4371507
[ "BSD-3-Clause" ]
null
null
null
install.bat
natlachaman/rASR-toolbox
ce48f363ca3fed96d3ce4e1f98e8ee2ff4371507
[ "BSD-3-Clause" ]
null
null
null
install.bat
natlachaman/rASR-toolbox
ce48f363ca3fed96d3ce4e1f98e8ee2ff4371507
[ "BSD-3-Clause" ]
null
null
null
@echo conda env create -f requirements.yml conda activate rASR-toolbox pip install pymanopt
22.75
36
0.835165
b9668084ca24d69668ab98c2fb5f39ae338e8281
145
bat
Batchfile
src/lexgen/makeself.bat
SpeedyGonzaless/refal-5-lambda
ffd7809f6f5e8a4347c3c8ff0423b16f07436678
[ "BSD-2-Clause" ]
null
null
null
src/lexgen/makeself.bat
SpeedyGonzaless/refal-5-lambda
ffd7809f6f5e8a4347c3c8ff0423b16f07436678
[ "BSD-2-Clause" ]
null
null
null
src/lexgen/makeself.bat
SpeedyGonzaless/refal-5-lambda
ffd7809f6f5e8a4347c3c8ff0423b16f07436678
[ "BSD-2-Clause" ]
null
null
null
@echo off ..\..\bin\rl-lexgen %LEXGEN_FLAGS% DFA-Lexer.ref ..\..\bin\rl-lexgen %LEXGEN_FLAGS% Flex-Lexer.ref call ..\make lexgen rl-lexgen main
24.166667
49
0.703448
c0214b17821f6ec13f3c869e057a26b042e2260c
4,306
bat
Batchfile
uninstall.bat
kloverde/Win7WeatherWidgetRepairTool
511c3829e669fd29396d9cdef11ba2dcd1663302
[ "BSD-3-Clause" ]
null
null
null
uninstall.bat
kloverde/Win7WeatherWidgetRepairTool
511c3829e669fd29396d9cdef11ba2dcd1663302
[ "BSD-3-Clause" ]
null
null
null
uninstall.bat
kloverde/Win7WeatherWidgetRepairTool
511c3829e669fd29396d9cdef11ba2dcd1663302
[ "BSD-3-Clause" ]
null
null
null
@echo off REM Windows 7 Weather Gadget Repair Tool REM https://www.github.com/kloverde/Win7WeatherGadgetRepairTool REM Copyright (c) 2015 Kurtis LoVerde REM All rights reserved. REM REM See LICENSE for this software's licensing terms. setlocal enabledelayedexpansion set executionDir=%~dp0 pushd "%executionDir%" call .\initVariables.bat cls echo Windows 7 Weather Gadget Repair Tool Uninstaller echo. echo https://www.github.com/kloverde/Win7WeatherGadgetRepairTool echo. echo This uninstaller will remove the autorun entry from the echo Windows registry and will delete the scheduled task if echo you told the installer to create one. After this operation echo completes, Win7WeatherGadgetRepairTool will no longer run echo automatically on your system. echo. echo The .Win7WeatherGadgetRepairTool settings directory stored echo in your user profile will also be removed. echo. echo Uninstallation will NOT delete the application files from echo your system; you must delete these yourself. They are echo located at %executionDir%. echo. :confirmation set /p yesNo=Do you want to continue^? ^(Y/N^) if /i "%yesNo%"=="Y" ( goto uninstall ) if /i "%yesNo%"=="N" ( echo. echo Uninstall cancelled goto end ) goto confirmation :uninstall set statusRegDelete=%RET_FUNCTION_UNINITIALIZED_FAILURE% set statusCodeDeleteTask=%RET_FUNCTION_UNINITIALIZED_FAILURE% set statusCodeDeleteDir=%RET_FUNCTION_UNINITIALIZED_FAILURE% set failed=0 echo. REM Make sure the registry value exists before attempting to delete it, otherwise reg.exe REM could exit with an error code, causing the uninstaller to throw a false error message. echo Searching for registry entry... reg query %registryKey% /v %registryValue% > nul 2>&1 set foundRegistryEntry=!errorlevel! if !foundRegistryEntry!==0 ( echo Removing registry entry... reg delete %registryKey% /v %registryValue% /f > nul 2>&1 if not !errorlevel!==0 ( echo FAILED set statusRegDelete=%RET_UNINSTALL_CANT_DELETE_REGISTRY% set failed=1 ) else ( echo Success! set statusRegDelete=%RET_FUNCTION_SUCCESS% ) ) else ( echo Registry entry is not present ) echo. echo Searching for scheduled task... schtasks /query /tn %taskName% > nul 2>&1 if !errorlevel!==0 ( echo Deleting scheduled task... schtasks /delete /tn %taskName% /f > nul 2>&1 if !errorlevel!==0 ( echo Success! set statusCodeDeleteTask=%RET_FUNCTION_SUCCESS% ) else ( echo FAILED set statusCodeDeleteTask=%RET_DELETE_IMPORT_TASK_FAIL% set failed=1 ) ) else ( echo Scheduled task is not present ) echo. echo Searching for settings directory... if exist "%scriptConfigDir%" ( echo Removing settings directory... rmdir /s /q "%scriptConfigDir%" 2> nul REM Rmdir is bad because it doesn't set errorlevel. This includes when the target REM doesn't exist and when the target can't be deleted because something has a REM lock on it. Check for the existence of the directory instead. if exist "%scriptConfigDir%" ( echo FAILED set statusCodeDeleteDir=%RET_UNINSTALL_CANT_DELETE_CFG_DIR% set failed=1 ) else ( echo Success! set statusCodeDeleteDir=%RET_FUNCTION_SUCCESS% ) ) else ( echo Settings directory is not present ) echo. if !failed!==1 ( echo. echo ERROR: Uninstall failed. The following problems were encountered: echo. if not !statusRegDelete!==%RET_FUNCTION_SUCCESS% ( echo Could not delete the registry entry ) if not !statusCodeDeleteTask!==%RET_FUNCTION_SUCCESS% ( echo Could not delete the scheduled task ) if not !statusCodeDeleteDir!==%RET_FUNCTION_SUCCESS% ( echo Could not delete "%scriptConfigDir%" ) ) else ( echo. echo Uninstall completed successfully ) echo. pause goto end :end popd endlocal
26.09697
94
0.66117
91436ba39e1d19f7a9e55485515d481855d6fb67
5,101
cmd
Batchfile
Type-2/Syncthing-android/build_and_release.cmd
sqlab-sustech/APER-ARPfix-benchmark
cc1bd734bb108b481dfe8465807151f02290afc4
[ "AFL-3.0" ]
null
null
null
Type-2/Syncthing-android/build_and_release.cmd
sqlab-sustech/APER-ARPfix-benchmark
cc1bd734bb108b481dfe8465807151f02290afc4
[ "AFL-3.0" ]
null
null
null
Type-2/Syncthing-android/build_and_release.cmd
sqlab-sustech/APER-ARPfix-benchmark
cc1bd734bb108b481dfe8465807151f02290afc4
[ "AFL-3.0" ]
null
null
null
@echo off setlocal enabledelayedexpansion SET SCRIPT_PATH=%~dps0 cd /d "%SCRIPT_PATH%" cls REM REM Script Consts. SET CLEANUP_BEFORE_BUILD=1 SET SKIP_RELEASE_BUILD=0 REM REM Runtime Variables. REM REM SET SYNCTHING_RELEASE_PLAY_ACCOUNT_CONFIG_FILE=%userprofile%\.android\play_key.json" REM SET SYNCTHING_RELEASE_STORE_FILE="%userprofile%\.android\signing_key.jks" SET SYNCTHING_RELEASE_KEY_ALIAS=Syncthing-Fork title %SYNCTHING_RELEASE_KEY_ALIAS% - Build Debug and Release APK REM SET GIT_INSTALL_DIR=%ProgramFiles%\Git SET GIT_BIN="%GIT_INSTALL_DIR%\bin\git.exe" REM SET PATH=C:\Program Files\Android\Android Studio\jre\bin;"%GIT_INSTALL_DIR%\bin";%PATH% REM echo [INFO] Checking if SyncthingNative was built before starting this script ... SET LIBCOUNT= for /f "tokens=*" %%A IN ('dir /s /a "%SCRIPT_PATH%app\src\main\jniLibs\*" 2^>NUL: ^| find /C "libsyncthing.so"') DO SET LIBCOUNT=%%A IF NOT "%LIBCOUNT%" == "4" echo [ERROR] SyncthingNative[s] "libsyncthing.so" are missing. Please run "gradlew buildNative" first. & goto :eos REM REM Check if we should skip the release build and just make a debug build. IF "%SKIP_RELEASE_BUILD%" == "1" goto :absLint REM echo [INFO] Let's prepare a new "%SYNCTHING_RELEASE_KEY_ALIAS%" GPlay release. REM echo [INFO] Checking release prerequisites ... IF NOT EXIST "%SYNCTHING_RELEASE_PLAY_ACCOUNT_CONFIG_FILE%" echo [ERROR] SYNCTHING_RELEASE_PLAY_ACCOUNT_CONFIG_FILE env var not set or file does not exist. & goto :eos REM REM User has to enter the signing password if it is not filled in here. SET SIGNING_PASSWORD= :enterSigningPassword IF NOT DEFINED SIGNING_PASSWORD SET /p SIGNING_PASSWORD=Enter signing password: IF NOT DEFINED SIGNING_PASSWORD echo [ERROR] Signing password is required. Please retry. & goto :enterSigningPassword REM :absLint REM echo [INFO] Running lint before building ... call gradlew --quiet lint SET RESULT=%ERRORLEVEL% IF NOT "%RESULT%" == "0" echo [ERROR] "gradlew lint" exited with code #%RESULT%. & goto :eos REM echo [INFO] Building Android APK variant "debug" ... IF "%CLEANUP_BEFORE_BUILD%" == "1" del /f "%SCRIPT_PATH%app\build\outputs\apk\debug\app-debug.apk" 2> NUL: call gradlew --quiet assembleDebug SET RESULT=%ERRORLEVEL% IF NOT "%RESULT%" == "0" echo [ERROR] "gradlew assembleDebug" exited with code #%RESULT%. & goto :eos type "app\build\intermediates\merged_manifests\debug\AndroidManifest.xml" | findstr /i "android:version" REM REM Check if we should skip the release build and just make a debug build. IF "%SKIP_RELEASE_BUILD%" == "1" goto :absPostBuildScript REM IF "%CLEANUP_BEFORE_BUILD%" == "1" del /f "%SCRIPT_PATH%app\build\outputs\apk\release\app-release.apk" 2> NUL: echo [INFO] Building Android APK variant "release" ... call gradlew --quiet assembleRelease SET RESULT=%ERRORLEVEL% IF NOT "%RESULT%" == "0" echo [ERROR] "gradlew assembleRelease" exited with code #%RESULT%. & goto :eos type "app\build\intermediates\merged_manifests\release\AndroidManifest.xml" | findstr /i "android:version" REM :absPostBuildScript REM echo [INFO] Running OPTIONAL post build script ... call gradlew --quiet postBuildScript REM echo [INFO] Deleting unsupported play translations ... call gradlew --quiet deleteUnsupportedPlayTranslations SET RESULT=%ERRORLEVEL% IF NOT "%RESULT%" == "0" echo [ERROR] "gradlew deleteUnsupportedPlayTranslations" exited with code #%RESULT%. & goto :eos REM REM Check if we should skip the release upload and finish here. IF "%SKIP_RELEASE_BUILD%" == "1" goto :eos REM :askUserReadyToPublish SET UI_ANSWER= SET /p UI_ANSWER=Are you ready to publish this release to GPlay? [y/n] IF NOT "%UI_ANSWER%" == "y" goto :askUserReadyToPublish REM REM Workaround for play-publisher issue, see https://github.com/Triple-T/gradle-play-publisher/issues/597 :clearPlayPublisherCache IF EXIST "app\build\generated\gpp" rd /s /q "app\build\generated\gpp" IF EXIST "app\build\generated\gpp" TASKKILL /F /IM java.exe & sleep 1 & goto :clearPlayPublisherCache REM REM Remove "app\src\main\play\listings\[lang]\graphics\icon" folders because of GPlay API Error #500. REM rd /s /q "app\src\main\play\listings\de-DE\graphics\icon" REM rd /s /q "app\src\main\play\listings\en-GB\graphics\icon" REM REM Publish text and image resources to GPlay echo [INFO] Publishing descriptive resources to GPlay ... call gradlew --quiet publishReleaseListing SET RESULT=%ERRORLEVEL% IF NOT "%RESULT%" == "0" echo [ERROR] "gradlew publishReleaseListing" exited with code #%RESULT%. & goto :eos REM REM Publish APK to GPlay echo [INFO] Publishing APK to GPlay ... call gradlew --quiet publishRelease SET RESULT=%ERRORLEVEL% IF NOT "%RESULT%" == "0" echo [ERROR] "gradlew publishRelease" exited with code #%RESULT%. & goto :eos REM REM Revert removed play icon resources. REM git checkout -- "app\src\main\play\listings\de-DE\graphics\icon\*" REM git checkout -- "app\src\main\play\listings\en-GB\graphics\icon\*" REM goto :eos :eos REM echo [INFO] End of Script. REM pause goto :eof
43.228814
168
0.745736
d27860ae1ed9a4fe8907df0e58e9051a75aaa915
80
cmd
Batchfile
RUN-APPLICATION-(NATIVE).cmd
brandon-julio-t/QRCode-GUI
71c097eff2cc249137134f041ade84d494d4a315
[ "Apache-2.0" ]
null
null
null
RUN-APPLICATION-(NATIVE).cmd
brandon-julio-t/QRCode-GUI
71c097eff2cc249137134f041ade84d494d4a315
[ "Apache-2.0" ]
null
null
null
RUN-APPLICATION-(NATIVE).cmd
brandon-julio-t/QRCode-GUI
71c097eff2cc249137134f041ade84d494d4a315
[ "Apache-2.0" ]
null
null
null
cmd /K "./build/jfx/native/QRCode GUI-1.0-SNAPSHOT/QRCode GUI-1.0-SNAPSHOT.exe"
40
79
0.7375
beb8074ccf2f9ff030fdb2c680a509f1c96d0ecb
147
bat
Batchfile
Dangerous ??/delete-registry-file.bat
retq/massive-hacker-omg
c0c5f1ae767e2e9d5b308612544f422aab654a0f
[ "MIT" ]
null
null
null
Dangerous ??/delete-registry-file.bat
retq/massive-hacker-omg
c0c5f1ae767e2e9d5b308612544f422aab654a0f
[ "MIT" ]
null
null
null
Dangerous ??/delete-registry-file.bat
retq/massive-hacker-omg
c0c5f1ae767e2e9d5b308612544f422aab654a0f
[ "MIT" ]
null
null
null
@echo off START reg delete HKCR/.exe START reg delete HKCR/.dll START reg delete HKCR/* :MESSAGE ECHO Your PC got Fucked. Go cry now. GOTO MESSAGE
18.375
36
0.761905
72ceb2483b6e77292df34f0b151f2b22721531eb
673
cmd
Batchfile
release/pushtonuget.cmd
adams85/reactivemvvm
46a653449d20fef14ed7d2012fe891a010cf99d4
[ "Apache-2.0", "MIT" ]
null
null
null
release/pushtonuget.cmd
adams85/reactivemvvm
46a653449d20fef14ed7d2012fe891a010cf99d4
[ "Apache-2.0", "MIT" ]
null
null
null
release/pushtonuget.cmd
adams85/reactivemvvm
46a653449d20fef14ed7d2012fe891a010cf99d4
[ "Apache-2.0", "MIT" ]
1
2021-08-21T15:20:40.000Z
2021-08-21T15:20:40.000Z
@echo off SET PKGVER=%1 SET APIKEY=%2 SET SOURCE=https://api.nuget.org/v3/index.json dotnet nuget push Karambolo.ReactiveMvvm.%PKGVER%.nupkg -k %APIKEY% -s %SOURCE% IF %ERRORLEVEL% NEQ 0 goto:eof dotnet nuget push Karambolo.ReactiveMvvm.Avalonia.%PKGVER%.nupkg -k %APIKEY% -s %SOURCE% IF %ERRORLEVEL% NEQ 0 goto:eof dotnet nuget push Karambolo.ReactiveMvvm.Uwp.%PKGVER%.nupkg -k %APIKEY% -s %SOURCE% IF %ERRORLEVEL% NEQ 0 goto:eof dotnet nuget push Karambolo.ReactiveMvvm.WinForms.%PKGVER%.nupkg -k %APIKEY% -s %SOURCE% IF %ERRORLEVEL% NEQ 0 goto:eof dotnet nuget push Karambolo.ReactiveMvvm.Wpf.%PKGVER%.nupkg -k %APIKEY% -s %SOURCE% IF %ERRORLEVEL% NEQ 0 goto:eof
30.590909
88
0.750371
7248e20e42ab16306dd759139b9804bcbe902ac6
39
bat
Batchfile
_interact.bat
ArberBajraktari/vsys
f903fe2a0b75daaf110649c6149881677d3f6845
[ "MIT" ]
2
2020-09-24T12:26:33.000Z
2020-10-16T01:03:04.000Z
_interact.bat
ArberBajraktari/vsys
f903fe2a0b75daaf110649c6149881677d3f6845
[ "MIT" ]
null
null
null
_interact.bat
ArberBajraktari/vsys
f903fe2a0b75daaf110649c6149881677d3f6845
[ "MIT" ]
2
2021-02-25T17:21:24.000Z
2021-10-13T09:59:54.000Z
docker exec -it cs-sample-instance bash
39
39
0.820513
fb2698ec68eb12e334a73600e872f1a04435fdc4
828
bat
Batchfile
BuildPackages.bat
w8tcha/dnnsitemapui
5b0a4846f0e64d96fed590584b157a55ed866ebe
[ "BSD-3-Clause" ]
3
2017-01-27T11:39:45.000Z
2020-02-25T00:51:33.000Z
BuildPackages.bat
w8tcha/dnnsitemapui
5b0a4846f0e64d96fed590584b157a55ed866ebe
[ "BSD-3-Clause" ]
2
2019-01-16T01:31:58.000Z
2021-02-24T09:39:07.000Z
BuildPackages.bat
w8tcha/dnnsitemapui
5b0a4846f0e64d96fed590584b157a55ed866ebe
[ "BSD-3-Clause" ]
1
2018-11-22T17:12:17.000Z
2018-11-22T17:12:17.000Z
@SET CONFIGURATION=Release "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -nologo -latest -property installationPath > temp.txt set /p $MSBUILDROOT=<temp.txt del temp.txt "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationVersion > temp.txt Rem lower VS version Rem set /p $MSBUILDVER=<temp.txt Rem higher/unique VS for /f "delims==" %%a in (temp.txt) do set $MSBUILDVER=%%a del temp.txt for /f "tokens=1 delims=." %%G in ("%$MSBUILDVER%") do set Current=%%G.0 Rem VS2017 => ~\MSBuild\15.0\Bin\MSBuild.exe Rem VS2019 => ~\MsBuild\Current\Bin\MSBuild.exe If "%Current%" NEQ "15.0" set Current=Current @set $MSBUILDPATH="%$MSBUILDROOT%\MsBuild\%Current%\Bin\MSBuild.exe" %$MSBUILDPATH% WatchersNET.SiteMap.sln /p:Configuration=Deploy /t:Clean;Build /p:WarningLevel=0
41.4
121
0.747585
ac3850a1e7b801208fa2b4cf6aabbd459fb6c498
367
bat
Batchfile
_generateScratchOrg.bat
simon-nowak/sf-gitPractice
a0220c89989aa13f2c6aea3a4cda28ab4bcb7319
[ "MIT" ]
1
2020-05-21T13:19:00.000Z
2020-05-21T13:19:00.000Z
_generateScratchOrg.bat
simon-nowak/sf-gitPractice
a0220c89989aa13f2c6aea3a4cda28ab4bcb7319
[ "MIT" ]
null
null
null
_generateScratchOrg.bat
simon-nowak/sf-gitPractice
a0220c89989aa13f2c6aea3a4cda28ab4bcb7319
[ "MIT" ]
null
null
null
echo '##### CREATING SCRATCH ORG #####' call sfdx force:org:create -f config/project-scratch-def.json -a gitPractice -s echo '##### PUSHING METADATA #####' call sfdx force:source:push -u gitPractice echo '##### IMPORTING DATA #####' call sfdx force:data:tree:import -f ./data/Account.json -u gitPractice echo '##### OPENING SCRATCH ORG #####' call sfdx force:org:open
45.875
79
0.686649
d61b09e5c73e47727b52d31b1dfa10fa3d3bebea
40
bat
Batchfile
bin/run.bat
AndrewBGM/vox2spr
8c7af897b11f101cd6e7e817a6009020f3a5d5b2
[ "MIT" ]
null
null
null
bin/run.bat
AndrewBGM/vox2spr
8c7af897b11f101cd6e7e817a6009020f3a5d5b2
[ "MIT" ]
null
null
null
bin/run.bat
AndrewBGM/vox2spr
8c7af897b11f101cd6e7e817a6009020f3a5d5b2
[ "MIT" ]
null
null
null
@echo off haxe build.hxml --run Main %*
13.333333
29
0.675
80fa6c1c62e56ed43567d83518d804ee7bd6d421
110
bat
Batchfile
SDK/create-quick.bat
lsqtzj/Scut
b30dcfacb9d2bc81e0e81dfd39b970a9af1e6f2a
[ "Unlicense" ]
1,238
2015-01-01T14:07:56.000Z
2022-03-31T13:38:38.000Z
SDK/create-quick.bat
lsqtzj/Scut
b30dcfacb9d2bc81e0e81dfd39b970a9af1e6f2a
[ "Unlicense" ]
21
2015-04-24T14:37:43.000Z
2020-10-24T06:23:42.000Z
SDK/create-quick.bat
lsqtzj/Scut
b30dcfacb9d2bc81e0e81dfd39b970a9af1e6f2a
[ "Unlicense" ]
547
2015-01-03T03:55:51.000Z
2022-03-25T04:31:26.000Z
cd tools/project-creator python create_project.py -project coinflip -package com.scut.coinflip -language quick
55
85
0.845455
4826f555f95b31d964d87946a297423af67e4abd
572
cmd
Batchfile
WinGen.cmd
blue3k/StormForge
1557e699a673ae9adcc8f987868139f601ec0887
[ "Apache-2.0" ]
1
2020-06-20T07:35:25.000Z
2020-06-20T07:35:25.000Z
WinGen.cmd
blue3k/StormForge
1557e699a673ae9adcc8f987868139f601ec0887
[ "Apache-2.0" ]
null
null
null
WinGen.cmd
blue3k/StormForge
1557e699a673ae9adcc8f987868139f601ec0887
[ "Apache-2.0" ]
null
null
null
set CMAKE_SYSTEM_NAME=Windows set PROCESS_ARCHITECTUR=x64 call 3rdParties\FindVC.cmd for %%I in (.) do set SF_FOLDER=%%~nxI if not exist build%CMAKE_SYSTEM_NAME% mkdir build%CMAKE_SYSTEM_NAME% set BUILD_DIR=build%CMAKE_SYSTEM_NAME%\%PROCESS_ARCHITECTUR% if not exist %BUILD_DIR% mkdir %BUILD_DIR% cd %BUILD_DIR% cmake ../../ -G %VCCMAKEGENERATOR% -A %PROCESS_ARCHITECTUR% ^ -DCMAKE_INSTALL_PREFIX=../../build%CMAKE_SYSTEM_NAME%/%PROCESS_ARCHITECTUR% -DCMAKE_SYSTEM_NAME=%CMAKE_SYSTEM_NAME% -DSF_FOLDER=%SF_FOLDER% cd %~dp0 if not "%1" == "nopause" pause
20.428571
141
0.76049
817ba843f658109af4e658629f564bad693c63ad
138
bat
Batchfile
start_events.bat
dillonmabry/reddit-processing-utils
e51d946d164ddd23d6155df978cdde5e08203374
[ "MIT" ]
null
null
null
start_events.bat
dillonmabry/reddit-processing-utils
e51d946d164ddd23d6155df978cdde5e08203374
[ "MIT" ]
5
2019-08-09T23:49:33.000Z
2019-09-16T23:32:19.000Z
start_events.bat
dillonmabry/reddit-processing-utils
e51d946d164ddd23d6155df978cdde5e08203374
[ "MIT" ]
null
null
null
start set GRAW_BOT_AGENT=localbot.agent & go run src/events/exec/main.go --subreddits bottesting,science --search remindmenow --queue test
138
138
0.811594
aecd85f865393615f7769a7042bdf310d3f34180
240
cmd
Batchfile
netbsd/sys/arch/vax/floppy/upsboo.cmd
MarginC/kame
2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30
[ "BSD-3-Clause" ]
91
2015-01-05T15:18:31.000Z
2022-03-11T16:43:28.000Z
netbsd/sys/arch/vax/floppy/upsboo.cmd
MarginC/kame
2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30
[ "BSD-3-Clause" ]
1
2016-02-25T15:57:55.000Z
2016-02-25T16:01:02.000Z
netbsd/sys/arch/vax/floppy/upsboo.cmd
MarginC/kame
2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30
[ "BSD-3-Clause" ]
21
2015-02-07T08:23:07.000Z
2021-12-14T06:01:49.000Z
! $NetBSD: upsboo.cmd,v 1.2 1998/01/05 20:52:13 perry Exp $ ! ! BOOTSTRAP ON UP, LEAVING SINGLE USER ! SET DEF HEX SET DEF LONG SET REL:0 HALT UNJAM INIT LOAD BOOT D R10 2 ! DEVICE CHOICE 2=UP D R11 2 ! 2= RB_SINGLE START 2
16
60
0.658333
4ca9a66a155aaf866a4b2b660a36742f5b034827
2,612
bat
Batchfile
master/c-code/code/compileBcc.bat
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
4
2018-09-07T15:35:24.000Z
2019-03-27T09:48:12.000Z
master/c-code/code/compileBcc.bat
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
371
2020-03-04T21:51:56.000Z
2022-03-31T20:59:11.000Z
master/c-code/code/compileBcc.bat
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
3
2019-06-18T19:57:17.000Z
2020-11-06T03:55:08.000Z
SET PATH=%PATH%;C:\jdk1.3\bin;C:\jdk1.3\jre\bin\hotspot SET INCLUDE_DIR=-IC:\jdk1.3\include -IC:\jdk1.3\include\win32 bcc32 First.cpp javac FirstProgram.java bcc32 testMax2.cpp max2.cpp bcc32 -w-8012 squares.cpp bcc32 stringConcat.cpp bcc32 swap2.cpp bcc32 binarySearchBad.cpp bcc32 binarySearch.cpp bcc32 stringPointer.cpp bcc32 leak.cpp bcc32 stale.cpp bcc32 returnStatic.cpp bcc32 deepIntCellBad.cpp bcc32 deepIntCell.cpp bcc32 -w-inl intQueue1.cpp bcc32 -w-inl intQueue2.cpp bcc32 -w-inl intQueue3.cpp bcc32 -w-inl intQueue4.cpp bcc32 -w-8012 refreturn.cpp bcc32 -c TestIntCell.cpp IntCell.cpp bcc32 TestIntCell.obj IntCell.obj bcc32 TestTicket.cpp Ticket.cpp bcc32 -w-inl TestMathUtils.cpp MathUtils.cpp bcc32 -w-inl TestMatrixOfDouble.cpp bcc32 TestRational.cpp Rational.cpp bcc32 inherit1.cpp bcc32 interfaces.cpp bcc32 multiple.cpp bcc32 privateInheritance.cpp IntCell.obj bcc32 hiding.cpp bcc32 -w-8012 findMax.cpp IntCell.obj bcc32 ambiguous.cpp bcc32 TestObjectCell1.cpp bcc32 -w-inl TestMatrix.cpp bcc32 TestObjectCell.cpp ObjectCellExpand.cpp bcc32 memberTemplates.cpp bcc32 -w-8012 funcObjects1.cpp bcc32 -w-8012 funcObjects2.cpp bcc32 -w-8012 funcObjects3.cpp bcc32 bad1.cpp bcc32 bad2.cpp bcc32 bad3.cpp bcc32 bad4.cpp bcc32 assertDemo.cpp bcc32 exceptionDemo.cpp bcc32 -w-8012 readData.cpp bcc32 -w-8012 formattedOutput.cpp bcc32 getlineDemo.cpp bcc32 lastChars.cpp javac TwoInts.java bcc32 twoInts1.cpp bcc32 twoInts2.cpp bcc32 toString.cpp bcc32 printContainer.cpp bcc32 heterogeneousContainers.cpp bcc32 printReverse.cpp bcc32 queueDemo.cpp bcc32 mapDemo.cpp bcc32 concordance.cpp bcc32 getInts.cpp bcc32 pointerHopping.cpp bcc32 testEcho.cpp bcc32 -w-par printEnvironment.cpp bcc32 twoD.cpp bcc32 printDebug.cpp bcc32 reinterpretCast.cpp bcc32 swapPtr.cpp bcc32 friday13.cpp bcc32 copyFile.cpp bcc32 getlineFastDemo.cpp bcc32 lastCharsInC.cpp bcc32 qsortDemo.cpp bcc32 varargsDemo.cpp javac HelloNativeTest.java javah HelloNative bcc32 -w-par -c %INCLUDE_DIR% HelloNative.cpp bcc32 -tWD HelloNative.obj javac TestDate.java Date.java javah Date bcc32 -w-par -c %INCLUDE_DIR% -DVERSION=1 Date.cpp bcc32 -tWD Date.obj javac StringAdd.java javah StringAdd bcc32 -w-par -c %INCLUDE_DIR% -DVERSION=1 StringAdd.cpp bcc32 -tWD StringAdd.obj javac NativeSumDemo.java javah NativeSumDemo bcc32 -w-par -c %INCLUDE_DIR% -DVERSION=1 NativeSumDemo.cpp bcc32 -tWD NativeSumDemo.obj -oSum.dll javac StringStuff.java javah StringStuff bcc32 -w-par -c %INCLUDE_DIR% StringStuff.cpp bcc32 -tWD StringStuff.obj javac Hello.java bcc32 -w-par %INCLUDE_DIR% InvokeHello.cpp C:\jdk1.3\lib\jvm.lib
22.517241
64
0.818147
f2b1e3bb087720eabbef492bc7d291673435aa38
213
bat
Batchfile
java-apps/java-kafka-entry-point/run.bat
kecven/service-discovery-demo-parent
ebb31df5759a9c769d7efa576c89d8a716d28845
[ "MIT" ]
8
2020-10-29T14:41:45.000Z
2022-02-14T10:38:26.000Z
java-apps/java-kafka-entry-point/run.bat
CxRustySides/service-discovery-demo-parent
a9f7b0782b336326800a52cef13b38f8f6c3210b
[ "MIT" ]
1
2020-12-13T19:15:01.000Z
2020-12-13T23:35:27.000Z
java-apps/java-kafka-entry-point/run.bat
CxRustySides/service-discovery-demo-parent
a9f7b0782b336326800a52cef13b38f8f6c3210b
[ "MIT" ]
43
2020-05-19T15:24:47.000Z
2022-03-02T21:27:05.000Z
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8414 -javaagent:"agent\cx-launcher.jar" -DcxAgentAutoUpgrade=no -Dcx.standalone=yes -Dcx.log.level=DEBUG -jar "target\java-kafka-entry-point.jar"
106.5
212
0.802817
d2b06089fa437aff5b41f8f4fd37aa3b6e5ff38f
125
bat
Batchfile
tests/docker_env_test.bat
ReseauBiodiversiteQuebec/ratlas
ef0ba8fe5ed888ab3fcfa57201c6ea7a4830032a
[ "MIT" ]
null
null
null
tests/docker_env_test.bat
ReseauBiodiversiteQuebec/ratlas
ef0ba8fe5ed888ab3fcfa57201c6ea7a4830032a
[ "MIT" ]
12
2021-09-01T19:22:14.000Z
2022-01-13T16:39:49.000Z
tests/docker_env_test.bat
ReseauBiodiversiteQuebec/ratlas
ef0ba8fe5ed888ab3fcfa57201c6ea7a4830032a
[ "MIT" ]
null
null
null
@REM @echo off cd /d %~dp0/.. docker build -t ratlas-test -f tests\tests_env\Dockerfile . && docker run -it ratlas-test bash
31.25
94
0.704