This App is No Longer Maintained. Visit the Replacement at StrokesPlus.net

StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | 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
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

stevem99

8 Posts

Posted - 07/19/2013 :  11:08:01  Show Profile
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
2615 Posts

Posted - 07/19/2013 :  11:19:09  Show Profile  Visit Rob's Homepage
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
that works great... thanks for fast reply Rob
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000