Skip to content

Instantly share code, notes, and snippets.

@willblatt
willblatt / surpacStartup.vbs
Created July 2, 2016 19:03
Surpac startup script
Option Explicit
Dim strPath
Dim shortCutPath
Dim rootDir
' path to the shortcut without the ".lnk" extension
shortCutPath = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\GEOVIA\GEOVIA Surpac 6.7.1 (x64)"
@willblatt
willblatt / call_external.cc
Created June 28, 2016 19:15
call external program from C++
#include <iostream>
#include <string>
#include <windows.h>
#include <tchar.h>
void _tmain(int argc, TCHAR *argv[]) {
STARTUPINFO si;
PROCESS_INFORMATION pi;
@willblatt
willblatt / embed_python.cc
Created June 28, 2016 19:13
Example of embedding python into C++ application
/*
VC++ Directories
----------------
Include Directories: C:\Anaconda3\include
Library Directories: C:\Anaconda3\libs
*/
#include <iostream>
@willblatt
willblatt / twapi_example.tcl
Created March 13, 2013 19:47
Quick example for twapi to get values from excel.
puts [package names]
package require twapi
set excel [::twapi::comobj Excel.Application]
$excel DisplayAlerts [expr 0]
set workbooks [$excel Workbooks]
$workbooks Open "C:/Users/willblatt/BlattBros/Projects/10000 Temp/XLS_Files_Chip/CHIP_ASSAY_TABLE.xlsx"
set workbook [$workbooks Item 1]