Skip to content

Instantly share code, notes, and snippets.

@jimfoltz
Created October 6, 2018 23:05
Show Gist options
  • Save jimfoltz/f7525da9f11629372d67a23017a74b4c to your computer and use it in GitHub Desktop.
Save jimfoltz/f7525da9f11629372d67a23017a74b4c to your computer and use it in GitHub Desktop.

Revisions

  1. jimfoltz created this gist Oct 6, 2018.
    26 changes: 26 additions & 0 deletions su.ahk
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
    ; #Warn ; Enable warnings to assist with detecting common errors.
    SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
    ;SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.



    Versions := {}
    Versions[17] := "C:\Program Files\SketchUp\SketchUp 2017\Sketchup.exe"
    Versions[16] := "C:\Program Files\SketchUp\SketchUp 2016\Sketchup.exe"

    ;RubyStartup := ""
    If FileExist("bootstrap.rb")
    RubyStartup := " -RubyStartup " A_WorkingDir "\bootstrap.rb "

    f := A_Args[1]

    if f <>
    path := A_WorkingDir "\" f

    cmd := Versions[16] RubyStartup path
    Run, %cmd%

    WinWaitActive, Welcome to SketchUp ahk_class #32770,,7
    SetControlDelay -1
    ControlClick, Start using SketchUp