AutoHotkey Community

It is currently May 27th, 2012, 1:23 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: January 7th, 2006, 12:45 pm 
Hi folks !

Thanks all, you're the best.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 10th, 2006, 11:19 am 
Offline
User avatar

Joined: December 20th, 2004, 12:19 pm
Posts: 798
Location: LooseChange911.com Ask Questions, Demand Answers █ The WTC bldgs █ shouldn't have fallen █ that fast
Decarlo110 wrote:
There is no built-in variable for that, but you could use:
Code:
StringTrimRight, var_trimmed, A_LoopFileFullPath, 4

Test...
Code:
A_LoopFileFullPath=C:\filename.htm
var_trimmed=C:\filename

...good, ok...

Code:
A_LoopFileFullPath=C:\filename.html
var_trimmed=C:\filename.

...Danger Will Robinson!...an extra dot. It gets worse if the extension is longer. That's why I suggested SplitPath in the other thread...

Code:
SplitPath, A_LoopFileName, , , , A_LoopFileNameNoExt

...ok, so I didn't *test* either version, but I pretty much know that StringTrimRight is really only gonna remove 4 chars, leaving the dot in the 2nd example...I am also pretty sure Chris wrote SplitPath so it works with all extensions.

_________________
AutoHotkey-Hotstring.ahk - Helping the world spell "AutoHotkey" correctly! (btw, it's a lowercase k!)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey and 17 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group