topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday December 15, 2024, 12:05 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: DONE: Help req automating some typing type stuff - autohotkey? skrommel?  (Read 20355 times)

moerl

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 404
    • View Profile
    • Donate to Member
I used "automation" for lack of a better term.. all I'm trying to do is something like the following: not all forums are as freaking awesome as this one, running SMF. In some, I have to type *NAME* every time, manually.. to get a proper BBCode link in there. I'd like to be able to automate that so that is inserted automatically, maybe even with the link already there so that I only have to enter the name? That would require the cursor to be between ] and [ but I don't know if that's possible.. something of the sort. I'm about to try out Autohotkey because it's on the GREAT SOFTWARE LIST and I've never heard anything bad about it. In fact, everybody's raving about it and I've never used any such program before. I suppose I'm in for a ride but I just wanted to check here if I'm making the best possible choice. What else is there?

Thanks
« Last Edit: October 20, 2005, 09:47 PM by mouser »

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,069
    • View Profile
    • Donate to Member
Re: Best "automation" program?
« Reply #1 on: October 20, 2005, 07:23 PM »
I'm not sure I am understanding exactly what you want, but to enter a URL into these messages I do the following:

Usually I am copying a URL either from a shortcut or the address bar in a browser, so I use the mouse to highlight and copy it to the clipboard.

I then type the text of my message, eg.

Try looking here

To get "here" highlighted and linked, I type it, highlight it with the mouse, click on the globe above the edit window. that produces here with the URL tags around it. I then click inside the left URL tag, just to the left of ] and type =, then mouse right click and paste.

apart from the = and copy/paste clicks I can't see how it could be simplified further ???

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Best "automation" program?
« Reply #2 on: October 20, 2005, 07:50 PM »
he's not talking about for this forum, but in general on other forums;
this might be something for coding snacks?

at least there skrommel could start you off with some basic script to do what you want in auto hotkey and you could play and customize from there.

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,069
    • View Profile
    • Donate to Member
Re: Best "automation" program?
« Reply #3 on: October 20, 2005, 08:30 PM »
he's not talking about for this forum, but in general on other forums;

Oo err ... knuckles duly rapped ... I'll crawl back in my hole and be quiet ...

moerl

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 404
    • View Profile
    • Donate to Member
Re: Best "automation" program?
« Reply #4 on: October 20, 2005, 09:12 PM »
I appreciate the help :). I got AutoHotkeys yesterday but I'm utterly overwhelmed with it. I have no clue where to start :)

Thanks

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Best "automation" program?
« Reply #5 on: October 20, 2005, 09:46 PM »
we have a resident autohotkey exper on this forum, he can surely shed some light.
im moving this to coding snack section where skrommel roams  8)

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #6 on: October 21, 2005, 02:32 AM »
 :huh: I actually didn't understand any of that. You want to automate some part of posting to forums? Please explain.

Skrommel

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,069
    • View Profile
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #7 on: October 21, 2005, 03:41 AM »
Crawling back from under my stone, I think I have now twigged ...

I think he wants a script to enter a URL and generate/insert the BBcode to produce a link like this that will work in all bulletin boards.

So preumably: a hotkey to bring up a dialogue, you enter URL and name and the appropriate BBcode is inserted at the cursor? Is that correct?


.... or shall I crawl back under my rock ...

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #8 on: October 21, 2005, 04:24 AM »
yes, i think that's it, with perhaps text from clipboard already in the dialog maybe (if its url format)?

so maybe a small dialog with 2 edit boxes, one for typing the url and one for typing the title of the link, and then a radio group with options like:
"format for bb code"
"format for html link"

and then finally a button to close dialog and copy result to clipboard?

actually sounds like a fantastic idea to me for those of us who paste urls a lot.

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #9 on: October 21, 2005, 04:52 AM »
I'm about to try out Autohotkey because it's on the GREAT SOFTWARE LIST and I've never heard anything bad about it. In fact, everybody's raving about it and I've never used any such program before. I suppose I'm in for a ride but I just wanted to check here if I'm making the best possible choice.
Yes, you are! :)

Read https://www.donation...dex.php?topic=1167.0

moerl

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 404
    • View Profile
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #10 on: October 21, 2005, 10:41 PM »
Yep.. you guys nailed it. That's what I was thinking of :)

zridling

  • Friend of the Site
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 3,299
    • View Profile
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #11 on: October 21, 2005, 10:58 PM »
Here's the AutoHotkey hotkey code I use to insert a bold URL into a forum entry (note the two types):

   

   

So when I type "urll1", it converts it to      and I just go back and insert the URL and what text I want to identify it with. If a forum or haloscan message site requires the href type of URL, then I just type "urll2" and it's there, too. I always bold links to make them stand out. Simple, but hope it helps others.
« Last Edit: October 21, 2005, 11:16 PM by zridling »

moerl

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 404
    • View Profile
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #12 on: October 22, 2005, 02:15 AM »
Thanks zridling!

I'm still a noob when it comes to AHK and I'm wondering just how to go about implementing into it what I'm trying to do. Basically, I would like the following:

Consider the following scenario. On some random forum online, I'd like to link to https://www.donationcoder.com but not via URL like that in its pure form, but with a pretty hyperlinked word, like this:
[url=https://www.donationcoder.com]DonationCoder.com[/url]
or
<a href=url=https://www.donationcoder.com>DonationCoder.com</a>
What I'd like to be able to do, somehow, with AHK, is this. We assume that whenever I want to use this as of yet inexistent script I have a URL in the clipboard. Now, the URL in the clipboard and an execution of the desired script later, I'd like to have either the HTML or BBCode version of that link inserted into the focused text-field, with nothing specified as the link test, but just the cursor blinking at the position of the star here:
[url=URL]*[/url]
or
<a href=URL>*</a>

I have not the slightest of clues about how I could do this in AutoHotkey. Thanks for trying to help.
« Last Edit: October 22, 2005, 02:17 AM by Shangnyun »

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #13 on: October 22, 2005, 02:56 AM »
Well, if I understand correctly what you want to do, that's very easy!

Since I prefer to use the keyboard whenever possible I coded something like that for images:

:o*:.img::
InputBox, SearchWords, Forum - enter image, Enter the image URL:
SetKeyDelay 0
SendRaw [img]%SearchWords%[/img]
return
Now I can just type .img and in the box that pops up I just Ctrl-V the URL from the clipboard and hit Enter.

Try it. Like it? :)

moerl

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 404
    • View Profile
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #14 on: October 22, 2005, 02:59 AM »
Excuse my utter noobishness, but what do I do with that code? I mean, I literally know NOTHING about how to use AutoHotkeys.

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #15 on: October 22, 2005, 03:09 AM »
Excuse my utter noobishness, but what do I do with that code? I mean, I literally know NOTHING about how to use AutoHotkeys.
Oh, sorry :)
I hope you already installed AutoHotkey and have it running 24/7? Right-click the green H icon in the tray, click Edit This Script. Add those line at the bottom of the script, maybe add some comment lines to help you remember where you got it (this URL).

Then save your script. Then just right-click the green H icon in the tray again, click Reload This Script.

Now you can use it. :)

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,069
    • View Profile
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #16 on: October 22, 2005, 03:36 AM »
Neat - so now you could adapt that for urls too ...

:o*:.img::
InputBox, SearchWords, Forum - enter image, Enter the image URL:
SetKeyDelay 0
SendRaw [img]%SearchWords%[/img]
return

:o*:.url::
InputBox, FullURL, Forum - enter full URL to link to, Enter the full URL (inc. http://, ftp:// etc):
InputBox, URLlabel, Forum - enter text display label, Enter text label to display on page: 
SetKeyDelay 0
SendRaw [b][url=%FullURL%]%URLlabel%[/url][/b]
return

Only problem I can see is that I can't get them to work here in the forum edit window (which precisely where you want them).

They work fine in other windows though like NotePad !!!
« Last Edit: October 22, 2005, 03:46 AM by CarolHaynes »

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #17 on: October 22, 2005, 03:47 AM »
Huh?  :huh: Works perfectly here... are you maybe using some other scripts that conflict?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #18 on: October 22, 2005, 03:49 AM »
could be different browsers blocking hotkeys..

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #19 on: October 22, 2005, 03:49 AM »
So when I type "urll1", it converts it to [...]
Don't remember where I read that, but it turned out to be very helpful to only use triggers that start with a simple "." - there's really no chance you accidently type something like .psc or .uspi when you are writing emails or scripts. :)

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,069
    • View Profile
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #20 on: October 22, 2005, 03:52 AM »
Huh?   Works perfectly here... are you maybe using some other scripts that conflict?


Must be a Maxthon compat issue as it works in FireFox

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,069
    • View Profile
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #21 on: October 22, 2005, 04:03 AM »
I have tried modifying it so there isn't an obvious clash, but it still doesn't work in Maxthon ???

:^+!o*:.img::
InputBox, SearchWords, Forum - enter image, Enter the image URL:
SetKeyDelay 0
SendRaw [img]%SearchWords%[/img]
return

:^+!o*:.url::
InputBox, FullURL, Forum - enter full URL to link to, Enter the full URL (inc. http://,

ftp:// etc):
InputBox, URLlabel, Forum - enter text display label, Enter text label to display on page: 
SetKeyDelay 0
SendRaw [b][url=%FullURL%]%URLlabel%[/url][/b]
return

The hotkeys work, in that the boxes pop up ok but when it tries to past it doesn't produce any text ???



Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,069
    • View Profile
    • Donate to Member
Re: Help req automating some typing type stuff - autohotkey? skrommel?
« Reply #22 on: October 22, 2005, 04:18 AM »
Here is a workaround for anyone else having problems with this script ...

Basically it uses the cliboard to paste the code into the text. If it doesn't work, then simply press control V to paste the clipboard contents:

:^+!q*:.img::
InputBox, SearchWords, Forum - enter image, Enter the image URL:
SetKeyDelay 0
ClipBoard = [img]%SearchWords%[/img]
Send ^V
return

:^+!q*:.url::
InputBox, FullURL, Forum - enter full URL to link to, Enter the full URL (inc. http://, ftp:// etc):
InputBox, URLlabel, Forum - enter text display label, Enter text label to display on page: 
SetKeyDelay 0
ClipBoard = [b][url=%FullURL%]%URLlabel%[/url][/b]
Send ^V
return