-
Notifications
You must be signed in to change notification settings - Fork 6
/
stack_revRefactor_card_id_1002.livecodescript
61 lines (54 loc) · 1.69 KB
/
stack_revRefactor_card_id_1002.livecodescript
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
Script "stack_revRefactor_card_id_1002"
/*
# Name: card "main" of stack "revRefactor"
# ID: card id 1002 of stack "revRefactor"
*/
/**
* openStack
* When this stack is in the user Plugins folder
* It is set to open when the IDE launches
* this inserts this script into the backscripts
2019.05.26 mdw
* moved stack script into backscripts instead of frontscripts to avoid recursion
*/
on preOpenStack
local tPath
insert the script of this stack into back
dispatch "ideSubscribe" to me with "ideEditScript"
-- installer (in case the Refactor plugin isn't already in the user plugins folder)
try
if there is a stack "revmenubar" then
put revEnvironmentUserPluginsPath() into tPath
else
-- MetaCard
put specialfolderpath("documents") & "/Plugins" into tPath
put "Plugins" into tPath
end if
if tPath is not empty then
if there is a file (tPath & "/Refactor.livecode") then
else
answer "Do you want to install Refactor support into your user plugins folder?" with "Yes" and "No"
if it is "Yes" then
if there is no folder tPath then
create folder tPath
end if
set the filename of this stack to (tPath & "/Refactor.livecode")
save this stack as (tPath & "/Refactor.livecode")
end if
end if
end if
catch e
end try
--if there is a stack "revGlX2 code" then
--activateGLX2se
--else
activateIDEse
--end if
end preOpenStack
on closeStack
remove the script of this stack from back
revIDEUnsubscribeAll
end closeStack
on ideEditScript
--put "hello" & cr after msg
end ideEditScript