Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Bailing out


  • Please log in to reply
32 replies to this topic
nothere
  • Members
  • 242 posts
  • Last active: Jul 04 2015 12:55 AM
  • Joined: 25 Jul 2010
I would like the moderator to remove my profile from this forum, this language is too inconsistant.

[ Moderator!: Profile deletion is not practiced in this forum ]
[ Moderator!: Topic moved from Ask for Help ]

SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005

this language is too inconsistent.


So be it, but can you please explain what you were upto.

nothere
  • Members
  • 242 posts
  • Last active: Jul 04 2015 12:55 AM
  • Joined: 25 Jul 2010
AHK seemed simple to use for short routines so I was attempting to work with a database. After trying to do simple things, like access the API, it became apparant that it would take many, many months to learn the features required.

SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005

After trying to do simple things, like access the API, it became apparant that it would take many, many months to learn the features required.


You are giving up too easily, friend.

AHK is a highly addictive scripting language. Maybe it does not suit your current requirement, but if you hang on enough - you will be pleasantly surprised by what it offers.

I will be glad to hear about your programming background.

nothere
  • Members
  • 242 posts
  • Last active: Jul 04 2015 12:55 AM
  • Joined: 25 Jul 2010
I started with machine language and I am fluent in VB and a novice in C++. I have done a lot of work with RadASM which is fairly simple. MSDN is providing software that if full of bugs and requires too much, i.e. Framework, additional support to even run it.

Normally, I use Excel and VBA to do most of my work for personal use. I have done a lot of industrial control work using DDE. VBA is proably one of the most versitile languages I have ever worked with in that it will accomplish about any task that can be presented.

tidbit
  • Administrators
  • 2709 posts
  • Hates playing Janitor
  • Last active: Jan 15 2016 11:37 PM
  • Joined: 09 Mar 2008

it will accomplish about any task that can be presented.

You described AutoHotey aswell.

rawr. be very afraid
*poke*
. Populate the AutoHotkey city. Pointless but somewhat fun. .


KooKsTeR
  • Members
  • 157 posts
  • Last active: Aug 21 2015 09:55 PM
  • Joined: 19 Feb 2010
When i first started out I knew nothing about this program and its language. But if you give it time you will be able to do so many things. Practice makes perfect and keep getting familiar with the commands. And feel free to ask for help.

SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005

VBA is proably one of the most versitile languages I have ever worked with in that it will accomplish about any task that can be presented.


Well. I can say the same thing about AHK (almost).
I was using a nice tiny little utility called DevEject to eject my USB Flash drives. I got addicted to it before I realised it was not working in my Vista based laptop where I need it the most. It was simply crashing..

Lucky for me, the VC++ source code was included and I was able to reproduce the functionality in AHK ( in mere 45 lines ).

VC++ Source : deveject.cpp
AHK implementation: Safely Remove USB Flash Drive - 45L

Be informed that I do not know any of the current languages other than AHK. Originally, I was a FoxPro DB programmer and that was looong ago.

nothere
  • Members
  • 242 posts
  • Last active: Jul 04 2015 12:55 AM
  • Joined: 25 Jul 2010
Here is what I am seeing: If you take a look at the help file for DllCall, it is overwhelming. The major issue with it is the Arg1 entry which has to be looked (providing it can be found) up for each API call. Things like "UIntP", what is it? The API is the heart of Windows and AHK is not consistent with it; by that I mean AHK has its' own methods for laying out the call. There are several things that have shown up, like ahk_id, which are undefined and it takes time to chase it down - many others also. So far, I have not seen a structure for AHK's layout; yes I realize that each function develops its' own format.

When I start on a new language, I develop snippets to aid me in future reference and practice. With AHK, I have spent most of my time trying to get answers which distracts from the main issue. If I spend all of my time trying to chase down answers...

SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005
AHK is basically Hotkey & Automation based script language
and was designed for non-programmers
and so, is loved for its simplicity.

When I start on a new language, I develop snippets to aid me in future reference and practice. With AHK, I have spent most of my time trying to get answers which distracts from the main issue. If I spend all of my time trying to chase down answers...


Well.. There are enough snippets in this forum, but you will have to hunt them down.
Never mind.

Have you heard of AutoIt ?.. Usually non-programmers flee from there to here.
Since you mentioned about VBA, I guess it will suit you better.

:)

nothere
  • Members
  • 242 posts
  • Last active: Jul 04 2015 12:55 AM
  • Joined: 25 Jul 2010
AHK is great for running programs from a hotkey or a small user interface, and if you have a lot of time, you could do indepth. I have burnt out too many nerves on other languages.

I appreciate the help and hope for the best. In the years I have spent around "programming", I have found that "programmers" know too much about their product and thereby fail in conveying good interfaces to learner. If the programmer had to learn from scratch what they were trying to convey, their objectives would change dramatically.

tidbit
  • Administrators
  • 2709 posts
  • Hates playing Janitor
  • Last active: Jan 15 2016 11:37 PM
  • Joined: 09 Mar 2008
Didn't we all have to learn from scratch? Not like we were born with AHK in or brain :)
Just like with everything: some things are easier for some people then others.

rawr. be very afraid
*poke*
. Populate the AutoHotkey city. Pointless but somewhat fun. .


nothere
  • Members
  • 242 posts
  • Last active: Jul 04 2015 12:55 AM
  • Joined: 25 Jul 2010
Here is an example of what I mean, there isn't any explanation of how to implement it:

Introduction and Simple Examples
Although hotstrings are mainly used to expand abbreviations as you type them (auto-replace), they can also be used to launch any scripted action. In this respect, they are similar to hotkeys except that they are typically composed of more than one character (that is, a string).

To define a hotstring, enclose the triggering abbreviation between pairs of colons as in this example:

::btw::by the wayIn the above example, the abbreviation btw will be automatically replaced with "by the way" whenever you type it (however, by default you must type an ending character after typing btw, such as a space, period, or enter).

The "by the way" example above is known as an auto-replace hotstring because the typed text is automatically erased and replaced by the string specified after the second pair of colons. By contrast, a hotstring may also be defined to perform any custom action as in the following examples. Note that the commands must appear beneath the hotstring:

::btw::
MsgBox You typed "btw".
return

:*:]d:: ; This hotstring replaces "]d" with the current date and time via the commands below.
FormatTime, CurrentDateTime,, M/d/yyyy h:mm tt ; It will look like 9/1/2005 3:53 PM
SendInput %CurrentDateTime%
return



tidbit
  • Administrators
  • 2709 posts
  • Hates playing Janitor
  • Last active: Jan 15 2016 11:37 PM
  • Joined: 09 Mar 2008

To create a new script:
[*:3iw5cata]Download and install AutoHotkey.
[*:3iw5cata]Right-click an empty spot on your desktop or in a folder of your choice.
[*:3iw5cata]In the menu that appears, select New -> AutoHotkey Script. (Alternatively, select New -> Text Document.)
[*:3iw5cata]Type a name for the file, ensuring that it ends in .ahk. For example: Test.ahk
[*:3iw5cata]Right-click the file and choose Edit Script.
[*:3iw5cata]On a new blank line, type the following:
#space::Run <!-- w -->www.google.com<!-- w -->In the line above, the first character "#" stands for the Windows key; so #space means holding down the Windows key then pressing the spacebar to activate the hotkey. The :: means that the subsequent command should be executed whenever this hotkey is pressed, in this case to go to the Google web site. To try out this script, continue as follows:
[*:3iw5cata]Save and close the file.
[*:3iw5cata]Double-click the file to launch it. A new icon appears in the taskbar notification area.
[*:3iw5cata]Hold down the Windows key and press the spacebar. A web [*:3iw5cata]page opens in the default browser.
To exit or edit the script, right-click the green "H" icon in the taskbar notification area.

step-by-step on how to setup a file. AFAIK, no other language does this. they don't go this detailed.
From here, it should be pretty obvious.

rawr. be very afraid
*poke*
. Populate the AutoHotkey city. Pointless but somewhat fun. .


nothere
  • Members
  • 242 posts
  • Last active: Jul 04 2015 12:55 AM
  • Joined: 25 Jul 2010
What does this mean?
::btw:: 

MsgBox You typed "btw". 

return 



:*:]d:: ; This hotstring replaces "]d" with the current date and time via the commands below. 

FormatTime, CurrentDateTime,, M/d/yyyy h:mm tt ; It will look like 9/1/2005 3:53 PM 

SendInput %CurrentDateTime% 

return