Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bff8d39
commit 27fecfe
Showing
9 changed files
with
188 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
local W = require 'winapi' | ||
W.set_encoding(W.CP_UTF8) | ||
console = W.get_foreground_window() | ||
console:set_text 'ελληνική' | ||
W.set_clipboard 'ελληνική' | ||
print 'Press any key' | ||
local W = require 'winapi' | ||
local console = W.get_foreground_window() | ||
console:set_text 'e???????' | ||
W.set_clipboard 'e???????' | ||
print 'Press enter' | ||
io.read() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
local W = require 'winapi' | ||
local e = W.event() | ||
local count = 1 | ||
local W = require 'winapi' | ||
local e = W.event() | ||
local count = 1 | ||
local finished | ||
|
||
W.make_timer(500,function() | ||
print 'finis' | ||
if count == 5 then | ||
print 'finished!' | ||
os.exit() | ||
end | ||
e:signal() | ||
count = count + 1 | ||
end) | ||
|
||
while true do | ||
e:wait() | ||
print 'gotcha' | ||
W.make_timer(500,function() | ||
print 'tick' | ||
if count == 5 then | ||
print 'finished!' | ||
finished = true | ||
end | ||
e:signal() | ||
count = count + 1 | ||
end) | ||
|
||
while not finished do | ||
e:wait() | ||
print 'gotcha' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
to set path like %USERPROFILE%\Local Settings\Temp the type of value in registry mast be EXPAND_SZ.
So set_value need second parameter - value type. See winreg (http://luaforge.net/projects/jaslatrix)