Messages - cedardoc [ switch to compact view ]

Pages: prev1 [2] 3 4 5 6 7 8next
6
Coding Snacks / Re: structured plaintextfile based note taker
« on: May 27, 2009, 12:01 PM »
p.s.  I haven't really touched this in a long time, but this got me thinking, it would be better to make it assume ".txt" if you omit the extension when you write it... like [projects] becomes "projects.txt".  Right now, if you omit the extension it just asks what kind of program to use to open, but I can't get my computer to set a default application for files with no extensions.  If I ever get around to doing that I'll post it again (but don't hold your breath - I'm no programmer)

7
Coding Snacks / Re: structured plaintextfile based note taker
« on: May 27, 2009, 11:55 AM »
Okay, here 's what I got to work on its own.  I had it in a bigger  autohotkey script and had to tweak it a bit to get it to work on its own for some reason.  I hope it works for you!!  Let me know.  If it doesn't, i'm not sure what to suggest other than I wonder if you have the latest  autohotkey installed?

Dave

8
Coding Snacks / Re: structured plaintextfile based note taker
« on: May 25, 2009, 03:19 PM »
It shouldn't have anything to do with that.  Mine works on multiple computers in differently named folders.  The only thing I can think of is to delete all the semicolons in front of the msgbox commands and see what they say and just tinker with it that way - that's how I got it to work in the first place.  The only other thing is I could upload the file if that's an option here.  Do you know how to do that?

9
Coding Snacks / Re: structured plaintextfile based note taker
« on: May 24, 2009, 12:07 AM »
I took out some stuff I thought wasn't needed, maybe I took out something important by mistake  Try this:



;right mouse double click---------autohotkey to launch simple filename (cursor should be on line )
~RButton::

   If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500)
{
;  msgbox double right clicked
winactivate   
;Sleep 500   ; wait for right-click menu, fine tune for your PC
   

send {esc}{Home}{Home}+{End}
;sleep 100

send ^c ;selects the entire line and copies it
ClipWait, .40        ; wait for the script to catch up.
winactivate
sleep 100
send {home}
linestring = %clipboard%
sleep 500
;msgbox linestring is %linestring%
;find the position of the character "[", call it leftmark
bit1 = [
StringGetPos, leftmark, linestring, %bit1%
leftmark := leftmark + 2
;msgbox leftmark is %leftmark%
;find the position of the character "]", call it rightmark
bit2 = ]
StringGetPos, rightmark, linestring, %bit2%
rightmark := rightmark + 1
;msgbox rightmark is %rightmark%

;stringlength= %rightmark%-%leftmark%
stringlength := rightmark - leftmark
;msgbox stringlength is %stringlength%

thefilename := SubStr(linestring, leftmark , stringlength)

;msgbox thefilename is %thefilename%
IfExist, %thefilename%
{
run %thefilename%
}
IfNotExist, %thefilename%
{
MsgBox, 260,, the File "%thefilename%" does not exist. Create the file?
IfMsgBox Yes
{
    FileAppend, %thefilename%, %thefilename%
    SplashTextOn, 320, 100, file created
    Sleep, 400
    SplashTextOff
    run %thefilename%
}
else
    Exit
}
   }
Return




that's exactly what I have that works.  It has all the messagebox things I used trying to get it to work originally, but they're remarked out.  FYI sometimes I get a clipboard error thing the first time where it thinks the filename is empty.  In that case just cancel and it usually works the next time and after that.  Maybe a real programmer might be able to come along and really tune it up.  (that'd be nice)  Anyway, I hope this works for you.

10
Your right, that would be better.

I don't have experience with that - is a custom FARR hotkey the same thing as the word attached to an alias?  Just a link to instructions is all I need :-)

Thanks for the added suggestion

Pages: prev1 [2] 3 4 5 6 7 8next
Go to full version