StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Register | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Lua Scripts
 Action Scripts Using Alien
 SHEmptyRecycleBin
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

CountNyan

2 Posts

Posted - 09/23/2013 :  05:35:40  Show Profile  Reply with Quote
system: Windows 7 x64
StrokesPlus 2.7.4 x64
Lua for Windows v5.1.4-46


---------- On Lua for Windows "OK" ---------------------
require "alien"
local shell = alien.load("shell32.dll")
local EmpRecycleBin = shell.SHEmptyRecycleBinA
EmpRecycleBin:types{ ret = 'long', abi = 'stdcall', 'long', 'string', 'ulong' }
EmpRecycleBin(0, "",0)


---------- On StrokesPlus App Stop "Error" -------------
local alien = alien.core
local shell = alien.load("shell32.dll")
local EmpRecycleBin = shell.SHEmptyRecycleBinA
EmpRecycleBin:types{ ret = 'long', abi = 'stdcall', 'long', 'string', 'ulong' }
EmpRecycleBin(0,"",0)




What's wrong with it?

Rob

USA
2604 Posts

Posted - 09/23/2013 :  09:18:35  Show Profile  Visit Rob's Homepage  Reply with Quote
I generally keep my Lua alien functions in the Global Lua tab, so I'm not sure if that would cause any type of issue. The setup below worked for me.

In my Global Lua tab: (adjust as necessary if you already have any of these underlying objects defined)
alien = alien.core
shell32 = alien.load("shell32.dll")
gEmpRecycleBin = shell32.SHEmptyRecycleBinA
gEmpRecycleBin:types{ ret = 'long', abi = 'stdcall', 'long', 'string', 'ulong' }
function aEmpRecycleBin(hWnd, rootPath, dwFlags)
	return gEmpRecycleBin(hWnd, rootPath, dwFlags)
end

In my action:
aEmpRecycleBin(nil, nil, 0)
Go to Top of Page

CountNyan

2 Posts

Posted - 09/24/2013 :  04:35:55  Show Profile  Reply with Quote
Thanks!!
Global script worked perfectly.

Edited by - CountNyan on 09/24/2013 04:41:45
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000