-
Notifications
You must be signed in to change notification settings - Fork 121
/
LinuxTest.iahk
76 lines (64 loc) · 1.83 KB
/
LinuxTest.iahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#include FcnLib-Linux.iahk
Gui, Add, Text,, Please enter your name: %A_ComputerName%
Gui, Add, Edit, vName
Gui, Show
Sleep, 5000
ExitApp
Gui, +ToolWindow -Caption
Gui, Color, , 000022
Gui, font, s7 cCCCCEE,
Gui, font, , Verdana
Gui, Margin, 0, 0
Gui, Add, ListView, r10 w149 -Hdr, Text
Gui, Show
Sleep, 5000
ExitApp
Loop
{
;FileGetTime, modifiedTimeNew, /home/user/Dropbox/AHKs/LinuxAutorun.iahk
FileGetTime, modifiedTimeNew, /home/user/Dropbox/AHKs/LinuxTest.iahk
;msgbox, % modifiedtime
if NOT modifiedTime
modifiedTime:=modifiedTimeNew
if (modifiedTime != modifiedTimeNew)
{
timestamp := CurrentTime()
file=/home/user/Dropbox/IronAHK/%timestamp%.sh
;file=%timestamp%.sh
text=mono /home/user/Dropbox/IronAHK/IronAHK.exe /home/user/Dropbox/AHKs/LinuxAutorun.iahk
FileAppend, %text%, %file%
;Run, %file%
Sleep, 2000
FileDelete, %file%
;msgbox, hhiii
;SetWorkingDir, /home/user/Dropbox/IronAHK
;Run, ia.sh LinuxAutorun.iahk
;msgbox, should run that sucka
modifiedTime:=modifiedTimeNew
;reload
}
}
ExitApp
;check the first line of the file in a comment to see which compy the file should run on
date := CurrentTime()
tracefile=/home/user/Dropbox/Public/logs/trace.txt
path:="/home/user/Dropbox/AHKs/scheduled/"
file:="asap.ahk"
targetCompyFile=%path%target_compy.txt
FileRead, compy, %targetCompyFile%
compy := RegExReplace(compy, "(`r|`n)")
source=%path%%file%
dest=%path%%compy%/%date%.ahk
msg=`nSending AHK to %compy% for execution.
FileAppend, %msg%, %tracefile%
FileCopy, %source%, %dest%, 1
msgbox, %source%
msgbox, %dest%
ExitApp
;msgbox, hi %A_WorkingDir%
date := CurrentTime("hyphenated")
date := CurrentTime()
;FileAppend, %date%, out.txt
FileAppend, %date%, %tracefile%
;#include /home/user/Dropbox/AHKs/FcnLib.ahk
#include FcnLib-Linux.iahk