topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Monday March 18, 2024, 9:03 pm
  • 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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Ace_NoOne [ switch to compact view ]

Pages: [1]
1
Well, it works well enough for me
Same here - at least so far...

was wondering how to implement options
IniRead is very simple to implement. (I guess a proper options dialog would be overkill here; directly editing the INI file should be easy enough.)

I can put out an .ahk, but not sure how to convert to .exe...
Use ...\AutoHotkey\Compiler\Ahk2Exe.exe; you can even set a custom icon there...

2
This is brilliant - I've long wanted something like this!
You should definitely submit this to Lifehacker.org, and of course cross-post the code at the AHK forums.

Thanks!

3
Finished Programs / Re: DONE: MultiMonitorManager
« on: March 04, 2006, 02:39 PM »
I definitely gotta try this one out at my dad's place - he just bought a Media Center PC and wants to connect both his TFT and the TV...

btw: There's a bad link on https://www.donation...m/Software/Skrommel/ - the AHK link is https://www.donation...Skrommel/MultiMonMan/MultiMonMan/MultiMonMan/MultiMonMan.ahk (I wonder how that happened!?)

4
Post New Requests Here / Re: IDEA: Morse Code as You Type
« on: January 09, 2006, 01:13 PM »
This issue has haunted me, so I came up with the following AHK function:
; translate a sequence of "dits" and "dahs" into sounds
morse(sequence)
{
; access global variables
global
; split Morse string into single characters
StringSplit, sequenceItems, sequence
; translate characters into sounds
Loop, %sequenceItems0%
{
    ; if "dit"
If sequenceItems%A_Index% = %dit%
{
    SoundBeep, %frequency%, %short%
    Sleep, %spacing_symbol%
        }
        ; if "dah"
Else If sequenceItems%A_Index% = %dah%
{
    SoundBeep, %frequency%, %long%
    Sleep, %spacing_symbol%
        }
        ; if new letter
        Else If sequenceItems%A_Index% = %separator_letters%
{
    Sleep, %spacing_letter% ; DEBUG: one dit too long due to preceding "Sleep, %spacing_symbol%"?
        }
        ; if new word
        Else If sequenceItems%A_Index% = %separator_words%
{
    Sleep, %spacing_word% ; DEBUG: one dit too long due to preceding delay after character?
        }
        Else
        {
            MsgBox, % "unrecognized character: " . sequenceItems%A_Index%
}
}
}

In order to properly understand how this function works, take a look at the complete script:
/*
[program name] v[version number (e.g. 1.0)]
 by [author name]

[short description]
*/

/*
ToDo:
- [...]
*/

/*
change history
¯¯¯¯¯¯¯¯¯¯¯¯¯¯
# v[version number] ([date (yyyy-mm-dd)])
* [...]
*/

/*
settings, variable declarations
*/

#SingleInstance Force

programName = [program name] ; DEBUG: toDo
programVersion = [version number] ; DEBUG: toDo
programFullName = %programName% v%programVersion%
programAuthor = [author name] ; DEBUG: toDo?

dit = s ; symbol for "dit"
dah = l ; symbol for "dah"
separator_letters = , ; symbol for separating letters
separator_words = _ ; symbol for separating words

short = 50 ; duration of "dit"
long = % 3 * short ; duration of "dah"
spacing_symbol = %short% ; duration between symbols
spacing_letter = %long% ; duration between letters
spacing_word = % 7 * short ; duration between words

frequency = 600 ; frequency of "beep" sound produced

; Morse alphabet
char_a = % dit dah
char_b = % dah dit dit dit
char_c = % dah dit dah dit
char_d = % dah dit dit
char_e = % dit
char_f = % dit dit dah dit
char_g = % dah dah dit
char_h = % dit dit dit dit
char_i = % dit dit
char_j = % dit dah dah dah
char_k = % dah dit dah
char_l = % dit dah dit dit
char_m = % dah dah
char_n = % dah dit
char_o = % dah dah dah
char_p = % dit dah dah dit
char_q = % dah dah dit dah
char_r = % dit dah dit
char_s = % dit dit dit
char_t = % dah
char_u = % dit dit dah
char_v = % dit dit dit dah
char_w = % dit dah dah
char_x = % dah dit dit dah
char_y = % dah dit dah dah
char_z = % dah dah dit dit

/*
auto-execute section
*/

; process command line parameters - DEBUG: toDo
;If 0 > 0
;GoSub, commandLineParameters
morse(char_a)
; construct tray menu
GoSub, trayMenu
; end of auto-execute section
GoSub, quit ; DEBUG: shouldn't be necessary!?
Return

/*
hotkeys
*/

; [ALT]+[ESC]: terminate script
!Esc::
Suspend ; exempt from suspension
GoSub, quit
Return

/*
subroutines
*/

; construct tray menu - DEBUG: toDo
trayMenu:
; disable standard menu items
Menu, Tray, NoStandard
; show info message
Menu, Tray, Add, &About, about
; separator
Menu, Tray, Add
; terminate script
Menu, Tray, Add, &Quit, quit
Return

; show info message - DEBUG: toDo
about:
MsgBox, 64, %programFullName%,
( LTrim Join
    %programFullName%`n
    %A_Space%by %programAuthor%`n
    `n
[short description]`n
`n
Use [ALT]+[ESC] to the terminate program.
)
Return

; terminate script
quit:
ExitApp
Return

/*
functions
*/

; translate a sequence of "dits" and "dahs" into sounds
morse(sequence)
{
; access global variables
global
; split string into single characters
StringSplit, sequenceItems, sequence
; translate characters into sounds
Loop, %sequenceItems0%
{
    ; if "dit"
If sequenceItems%A_Index% = %dit%
{
    SoundBeep, %frequency%, %short%
    Sleep, %spacing_symbol%
        }
        ; if "dah"
Else If sequenceItems%A_Index% = %dah%
{
    SoundBeep, %frequency%, %long%
    Sleep, %spacing_symbol%
        }
        ; if new letter
        Else If sequenceItems%A_Index% = %separator_letters%
{
    Sleep, %spacing_letter% ; DEBUG: one dit too long due to preceding "Sleep, %spacing_symbol%"?
        }
        ; if new word
        Else If sequenceItems%A_Index% = %separator_words%
{
    Sleep, %spacing_word% ; DEBUG: one dit too long due to preceding delay after character?
        }
        Else
        {
            MsgBox, % "unrecognized character: " . sequenceItems%A_Index%
}
}
}
I'd recommend you copy this code to your AHK editor (syntax highlighting!)...

Disclaimer: I didn't properly check this code yet (I'm tired), and a few lines and variables (e.g. programVersion) are not necessary. That's because I've used my standard template for AHK scripts.

5
Post New Requests Here / Re: IDEA: Morse Code as You Type
« on: January 09, 2006, 11:53 AM »
Cool program, hurricanedavid - I've always wanted something like that!

I also think Brad's suggestion is worth considering; using beeps instead of playing waves sounds like a better solution.
However, here's an excerpt from the AHK manual:
SoundBeep [, Frequency, Duration]
[...]
The script waits for the sound to finish before continuing. In addition, system responsiveness might be reduced during sound production.
Another problem is the annoying PC speaker; if possible, I'd prefer to have a 'normal' sound that's modulated as needed. Or you could use two sound files: SHORT.WAV and LONG.WAV (and maybe a BLANK.WAV for spacing?).
This way, you could also use the program in headphones-only situations where the PC speaker would get you in trouble.

In addition, I'd also like to see an option to translate the keyboard inputs into Morse signs; i.e. "A" would be re-mapped to ".-", "B" to "-..." etc.

Oh, and if you don't mind, I'd welcome your publishing the source code. :)

6
Post New Requests Here / IDEA: Wikipedia @ click?
« on: January 09, 2006, 09:08 AM »
Hello,

let me begin by saying that I've tried to do this myself, but I guess I'm not qualified/experienced enough yet.
I'd posted the following over at the AutoHotkey forums, but it didn't elicit any response.
Thus I thought you guys here might be interested in the idea:

A friend just told me that Babylon Translator now offers a glossary that's connected to Wikipedia.
This means that you just have to middle-click any word or phrase and Babylon will display the respective Wikipedia article:


So I thought, why spend 50 $ on Babylon; this can be done with AHK as well - or can it?
Here's what I think the program should do:
  • First, middle-clicking a word or phrase marks it as the keyword to look for. This means there needs to be a way to somehow recognize the text under the mouse pointer. (I've considered using copy & paste for this - mark the phrase, then middle-click to copy the word/phrase to the clipboard - but not all programs use the same hotkey for that... :( )
  • Then, the appropriate URL is composed (e.g. http://en.wikipedia.org/wiki/%keyword%).*
  • Finally, the contents of that website (or part of it) should be displayed in a small window (similiar to that screenshot above). Opening the URL in the web browser would pretty much obviate the need for a program like this. However, writing a HTML parser is obviously not an option - maybe the existing IE rendering engine could be used (never done that before)? Otherwise, all the HTML tags would have to be stripped and the contents displayed as plain text...
* This means that not only Wikipedia, but any website with the keyword(s) in the URL could be accessed (cf. Firefox's quick searches)!?

Sounds like a good idea? Any suggestions on how to best translate this idea into AHK code? (I'm currently working on a little proof-of-concept script to see what can and can't be done - and how much effort it'd require.)

btw: I hope there aren't any copyright issues in accessing a website like that!?


PS: What would be a good name for such a script/program? I've thought of something like Information@click, but that's a little too corny I guess...
-Ace_NoOne

7
Yeah, sure, but it only saves the CURRENT page, not the linked one(s). (plus: Who uses IE anyway?! )

btw: I hope you've noticed that I've been editing my reply up there while you were posting...

8
*phew* I was concerned that I might be the only person on this planet who could use this kinda program - so I'm glad the idea was picked up...
And I'd never have expected that you'd come up with a solution right away - so thanks a lot for that!! I'll try it out as soon as I get home today!

As for the reason why I'm not using favorites: That would be far too complicated (too many clicks necessary) - especially since it's all just temporary links.

UPDATE: first impression
I just took a quick look at UrlHistory, and it works real smooth!
The HTML-site it creates is missing any tags though, so it doesn't create proper hyperlinks.
I could take a look at the code and fix this though, if I'm allowed to... !?
(more details to follow)


PS: Is there a way to download all the linked articles at once so you can easily transfer them to another computer and read them offline? I've tried using HTTrack for this, but that doesn't seem to work...

9
Hello there,

I guess many people know this problem: You often stumble across articles online which you don't have time to read immediately (e.g. when checking your RSS feeds at work).
So I came up with the idea to have a tiny program that scans the clipboard for URLs and then assembles them in a simple HTML file. So whenever you come across such an article (or anything else of interest), you just copy the URL to the clipboard and it will be added to your toRead.html.

In fact, a friend had already written such a program for me (in C/C++), but it's got some flaws (e.g. not recognizing FTP links) and missing features (e.g. no way to delete an entry without manually re-creating the whole list).
I've also tried to create such a program myself using AutoHotkey, but I guess I'm not gifted enough to finish it...

However, if you decide to take on this idea, I could provide you with the source codes of both these attempts.
In that case, I could also give you with a list of features to consider.

Comments are appreciated!

Pages: [1]