-- detects if tablet is connected to notebook (run on notebook) get("#515") -- splitLines bla = os_backtick('usb-devices') lines = splitLines(bla) for _, line in ipairs(lines) do if line:match("S:%s+Manufacturer=SurfTab") then print("Tablet connected!") return end end print("Tablet not connected!")
Began life as a copy of #554
test run test run with input download show line numbers
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, znullqslnikg
ID | Author/Program | Comment | Date | |
---|---|---|---|---|
968 | #1000604 (pitcher) | 2015-08-20 15:28:24 | ||
967 | #1000610 | Edit suggestion: !636 !629 main { static Object androidContext; static String programID; public static void main(String[] args) throws Exception { -- detects if tablet is connected to notebook (run on notebook) get("#515") -- splitLines bla = os_backtick('usb-devices') lines = splitLines(bla) for _, line in ipairs(lines) do if line:match("S:%s+Manufacturer=SurfTab") then print("Tablet connected!") return end end print("Tablet not connected!") }} | 2015-08-20 08:47:39 | delete |
52 | stefan | Works.
run -power -offline 555 | 2015-04-01 21:00:43 |