-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate solution.ahk
More file actions
41 lines (35 loc) · 917 Bytes
/
create solution.ahk
File metadata and controls
41 lines (35 loc) · 917 Bytes
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
#SingleInstance, Force
F2::
difficult := ""
name := ""
url := ""
while (url == ""){
InputBox, url,, Enter url of task
if (ErrorLevel == 1 || ErrorLevel == 2)
return
}
while (difficult == ""){
InputBox, difficult,, Enter difficult of task %url%
if (ErrorLevel == 1 || ErrorLevel == 2)
return
}
while (name == ""){
InputBox, name,, Enter name of task %url%
if (ErrorLevel == 1 || ErrorLevel == 2)
return
}
path = %A_WorkingDir%\\%difficult%\\%name%
FileCreateDir, %path%
FileCreateDir, %path%\\python
FileCreateDir, %path%\\cpp
FileCreateDir, %path%\\%name%
FileAppend, # %name%`n<a href=%url%>source</a>, %path%\\README.md
FileAppend, # %name%`n<a href=%url%>source</a>, %path%\\%name%\\README.md
FileAppend, # %url%, %path%\\python\\main.py
FileAppend, `/`/ %url%, %path%\\cpp\\main.cpp
Run, %path%
Run, %path%\\python
Run, %path%\\cpp
return
F3::
reload