-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathremote.lua
More file actions
239 lines (215 loc) · 5.42 KB
/
Copy pathremote.lua
File metadata and controls
239 lines (215 loc) · 5.42 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
local keyboard = libs.keyboard;
------------------------------------------------
-- File operations
------------------------------------------------
--@help run irfan view - define your installation path
actions.run_irfan = function()
os.start("C:/Program Files/IrfanView/i_view32.exe");
end
--@help open image in the favourite folder
actions.fave_a = function()
keyboard.press("o");
keyboard.text("E:\\photos\\subfolder\\image.jpg");
keyboard.press("enter");
end
--@help open browser
actions.open_dir= function()
keyboard.stroke("ctrl","b");
end
--@help open previous folder
actions.folder_up= function()
keyboard.stroke("ctrl","b");
keyboard.press("left");
keyboard.press("up");
keyboard.press("enter");
end
--@help open next folder
actions.folder_down= function()
keyboard.stroke("ctrl","b");
keyboard.press("left");
keyboard.press("down");
keyboard.press("enter");
end
--@help full screen
actions.fullscreen = function()
keyboard.press("enter");
end
--@help save modified file in original location filename-rem
--be sure to set the quality of saved images in the program
actions.save= function()
keyboard.stroke("ctrl","s");
keyboard.press("right","oem_minus","r","e","m","enter");
end
------------------------------------------------
-- Playback
------------------------------------------------
--@help previous image
actions.play_prev = function()
keyboard.stroke("backspace");
end
--@help next image
actions.play_next = function()
keyboard.stroke("space");
end
--@help 5 images back
actions.back_five = function()
keyboard.stroke("ctrl","backspace");
end
--@help 5 images forward
actions.fwd_five = function()
keyboard.stroke("ctrl","space");
end
--@help fullscreen
actions.fullscreen = function()
keyboard.stroke("enter");
end
--@help random image
actions.random_img = function()
keyboard.stroke("ctrl","m");
end
--@help slideshow
actions.slideshow = function()
keyboard.stroke("shift", "a");
end
--@help exit program
actions.exit = function()
keyboard.stroke("alt", "f4");
end
------------------------------------------------
-- Cursors
------------------------------------------------
--@help left
actions.cur_left = function()
keyboard.stroke("left");
end
--@help right
actions.cur_right = function()
keyboard.stroke("right");
end
--@help up
actions.cur_up = function()
keyboard.stroke("up");
end
--@help down
actions.cur_down = function()
keyboard.stroke("down");
end
------------------------------------------------
-- Zooming
------------------------------------------------
--@help zoom out
actions.zoom_out = function()
keyboard.press("oem_minus");
end
--@help zoom in
actions.zoom_in = function()
keyboard.press("oem_plus");
end
--@help full size view
actions.size_full = function()
keyboard.press("6");
end
--@help fit to screen
actions.size_real = function()
keyboard.press("1");
end
--@help toggle view size
actions.toggle_size = function()
keyboard.press("f");
end
------------------------------------------------
-- Rotation
------------------------------------------------
--@help rotate Left
actions.rotate_left = function()
keyboard.text("l");
end
--@help rotate left 45
actions.rl45= function()
keyboard.stroke("ctrl","u");
keyboard.press("oem_minus","4","5","enter");
end
--@help rotate right
actions.rotate_right= function()
keyboard.text("r");
end
--@help rotate right 45
actions.rr45= function()
keyboard.stroke("ctrl","u");
keyboard.press("4","5","enter");
end
--@help flip horizontal
actions.mirror_h = function()
keyboard.press("h");
end
--@help flip vertical
actions.mirror_v = function()
keyboard.press("v");
end
------------------------------------------------
-- Image adjust
------------------------------------------------
--@help greyscale
actions.greyscale = function()
keyboard.stroke("ctrl","g");
end
--@help darken
actions.darken = function()
keyboard.stroke("shift","g");
keyboard.press("tab","tab","tab","tab","pgup","pgup","enter");
end
--@help brighten
actions.brighten = function()
keyboard.stroke("shift","g");
keyboard.press("tab","tab","tab","tab","pgdown","pgdown","enter");
end
--@help less colour
actions.desat = function()
keyboard.stroke("shift","g");
keyboard.press("tab","tab","tab","tab","tab","tab","pgup","pgup","pgup","pgup","pgup","pgup","enter");
end
--@help more colour
actions.sat = function()
keyboard.stroke("shift","g");
keyboard.press("tab","tab","tab","tab","tab","tab","pgdown","pgdown","pgdown","pgdown","pgdown","pgdown","enter");
end
--@help reload original image
actions.reload = function()
keyboard.stroke("shift","r");
end
-------------------------------------------------------
--- unused functions ---
--- you may replace any of functions you do not use ---
-------------------------------------------------------
--@help yes = press Y
actions.yes= function()
keyboard.press("y","enter");
end
--@help no = press N
actions.yes= function()
keyboard.press("n","enter");
end
--@help undo last operation
actions.undo = function()
keyboard.stroke("ctrl","z");
end
--@help redo last operation
actions.undo = function()
keyboard.stroke("ctrl","j");
end
--@help apply pre-selected effect
actions.effect = function()
keyboard.stroke("ctrl","e");
keyboard.press("enter");
end
--@help maximal colour
actions.max_sat = function()
keyboard.stroke("shift","g");
keyboard.press("tab","tab","tab","tab","tab","tab","tab","2","5","5","enter");
end
--@help red reduction
actions.red_red = function()
keyboard.stroke("ctrl","a");
keyboard.stroke("shift","y");
keyboard.stroke("ctrl","a");
end