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

 All Forums
 Lua Scripts
 General Action Scripts
 the script doesn't work, and nothing happen,
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rootstock

21 Posts

Posted - 04/28/2014 :  09:40:14  Show Profile  Reply with Quote
i was not able to find any error in the script , Rob, please help .

local tp = acGetWindowTop(nil, gsx, gsy)
local rt = acGetMonitorRight(acGetMonitorFromPoint(gsx, gsy), 1)
local bt = acGetMonitorBottom(acGetMonitorFromPoint(gsx, gsy), 1)


if gsy < 250 then
if gsx < (rt / 2) then
if gex > (rt - gLeftRightMargin) then
gShowScreenMessage("it works", 1, gsx, gsy)
else
end
end
else
end

Rob

USA
2538 Posts

Posted - 04/28/2014 :  09:42:42  Show Profile  Visit Rob's Homepage  Reply with Quote
You'd need to include your definitions for gLeftRightMargin and gShowScreenMessage for me to review.

Also, provide a brief explanation of the script's purpose so I can understand your goal.
Go to Top of Page

rootstock

21 Posts

Posted - 04/28/2014 :  10:04:41  Show Profile  Reply with Quote
my purpose is
when the mouse from gys < 250 and left screen and draw to left margin
it show a message "it works".

I defined acGetMontorLeft just now, still not working
local rt = acGetMonitorLeft(acGetMonitorFromPoint(gsx, gsy), 1)
Go to Top of Page

Rob

USA
2538 Posts

Posted - 04/28/2014 :  11:11:01  Show Profile  Visit Rob's Homepage  Reply with Quote
Again, I don't know exactly what gLeftRightMargin is doing, so I left that part commented out. This part works for me:
local hMonitor = acGetMonitorFromPoint(gsx, gsy)
local rt = acGetMonitorRight(hMonitor, 1)
local lt = acGetMonitorLeft(hMonitor, 1)


if gsy < 250 then
	acMessageBox("gsy: "..gsy.." rt/2: "..(rt/2).." gex: "..gex)
	if gsx < (rt / 2) then
		acMessageBox("gsx < (rt / 2) = true")
		--if gex > (rt - gLeftRightMargin) then
		--	acMessageBox("it works")
		--else
		--	nothing here
		--end
	end
else
	--nothing here
end
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