Noisia Posted July 6, 2012 Share Posted July 6, 2012 First and foremost i would like to greet the AutoIt community for creating such powerful tool! I've recently discovered a program named Transfz that ables me to use AutoIt BASIC code to create extentions. Since i have close to none programming skills, i would be very thankful if someone could point me in the right direction in order to script something as basic as copying the last sub-directory string to the clipboard:"c:\directory\part_to_be_copied"I'm not entirely sure if it's scriptable since search engine extentions are set like this:[hotkeycombo] accelerator_shift=+ accelerator_ctrl=^ accelerator_alt= key=c [searchengine] url=http://www.youtube.com/ string=results?search_query=*&search=SearchThank you for your attention! Link to comment Share on other sites More sharing options...
JohnOne Posted July 6, 2012 Share Posted July 6, 2012 (edited) There is most likely a safer rexexp, but if the path is always like that this might suffice. ;MsgBox(0,0,_Paste("c:directorypart_to_be_copied")) ClipPut(_Paste("c:directorypart_to_be_copied")) Func _Paste($str) $pos = StringInStr($str, "",0,-1) $len = StringLen($str) $dir = StringRight($str,$len - $pos) Return $dir EndFunc EDIT: ClipPut() Edited July 6, 2012 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 6, 2012 Moderators Share Posted July 6, 2012 Looks pretty similar to Ini functions? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Noisia Posted July 6, 2012 Author Share Posted July 6, 2012 Thank you for replying in so short notice! I didn't explain myself quite clear. I wanted a script to copy the last directory of a path, that was just a visual representation, sorry if it looks misleading... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 6, 2012 Moderators Share Posted July 6, 2012 (edited) You're in a programming forum. You'll find the guys that love to chase posts are eager to hypothesize on what you want, and even provide code you probably won't understand. When posting here, to get the quickest, most precise result, I'd suggest you put in detail what you've are looking to do, and what you've done so far that has not acheived the desired result. Edited July 6, 2012 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
JohnOne Posted July 6, 2012 Share Posted July 6, 2012 Thank you for replying in so short notice!I didn't explain myself quite clear. I wanted a script to copy the last directory of a path, that was just a visual representation, sorry if it looks misleading... I was not confused or anything, but I am a little now, that was a path you provided was it not? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Noisia Posted July 6, 2012 Author Share Posted July 6, 2012 I want to copy the lowest part of a path at all times: c:exampleexampleexamplei_only_want_this_copied_to_clipboard c:another_examplesame_applies_here Link to comment Share on other sites More sharing options...
JohnOne Posted July 6, 2012 Share Posted July 6, 2012 And what I made does not do that? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now