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
 Can I use strsub function in StrokesPlus
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

stevem99

8 Posts

Posted - 07/19/2013 :  11:08:01  Show Profile  Reply with Quote
Trying to shorten a string with strsub. I get an error "attempt to call global strsub nil value". Here is the code:

local sTitle = acGetWindowTitle(nil,gsx, gsy)
sTitle = strsub(sTitle, 0, 8)

Rob

USA
2516 Posts

Posted - 07/19/2013 :  11:19:09  Show Profile  Visit Rob's Homepage  Reply with Quote
This is what you're looking for:
local sTitle = acGetWindowTitle(nil,gsx, gsy)
sTitle = string.sub(sTitle, 0, 8)
strsub in the list of keywords for the editor, but it may have been deprecated or something(?).
Go to Top of Page

stevem99

8 Posts

Posted - 07/19/2013 :  13:26:59  Show Profile  Reply with Quote
that works great... thanks for fast reply Rob
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