AutoHotkey Community

It is currently May 27th, 2012, 11:31 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: November 29th, 2011, 6:39 am 
HotKeyIt wrote:
I have got scripts that would be 2 pages long if there was not that feature,
Why don't you just write a function for it.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 29th, 2011, 6:46 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
@Guest:
Alright, I'm going to call you on this one. Are you purposely trying to create a circular argument? This is the Wish List forum - hence the wish & reasons for the wish. Demonstrations of functions have already been provided. Oddly enough, it seems like several users have written functions for this - therefore confirming that it is desirable functionality. However, as you are again trying to point out, it is not required functionality - as there are workarounds. But then again, we are in the Wish List forum ...

Also, note that I have to assume that you're the same guest because you aren't signed in.

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 29th, 2011, 7:03 am 
jethrow wrote:
Alright, I'm going to call you on this one. Are you purposely trying to create a circular argument?
Not at all. I just suggested a solution for his particular problem. What's wrong with that.

Quote:
Demonstrations of functions have already been provided.
Which means a workaround has been already provided. Then why did he still claim the suggest as if there had not been a solution yet? That appears he is creating a circular argument from my view.

Quote:
Also, note that I have to assume that you're the same guest because you aren't signed in.
There are more than one guest besides me in this thread. Note that you won't know which one is which in this forum allowing anonymous guests. This is irrelevant to this discussion.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 29th, 2011, 8:22 am 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Anonymous wrote:
jethrow wrote:
Alright, I'm going to call you on this one. Are you purposely trying to create a circular argument?
Not at all. I just suggested a solution for his particular problem. What's wrong with that.
The problem is that most user who desire that simple functionality have to write own function or search the forum for a solution, often writing own function is faster, so we end up with many function doing same simple stuff.

AutoHotkey should be able to do things like this on its own because it is so simple to implement.
Imagine {Tab 3} would not be possible, would you then also suggest to write own function for that to expand {Tab 3} to {Tab}{Tab}{Tab}?

jaco0646 wrote:
HotKeyIt wrote:
{100ms} would a better solution than {100}.
I agree.
HotKeyIt wrote:
I have got scripts that would be 2 pages long if there was not that feature,
May we see an example? It might help to demonstrate the need for this feature.
This would be worthless since we could use a function as Guest suggested.

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 29th, 2011, 9:21 am 
HotkeyIt wrote:
... because it is so simple to implement.
The process of designing syntax in a methodical manner is not simple and way harder than implementing the functionality with a non-organised design.

OK, I got one idea. What about allowing the expression mode and all numerical values in expression are regarded as delay.
Code:
SendInput, % "a" 1000 "{Enter}" 200 "b"

Quote:
Imagine {Tab 3} would not be possible, would you then also suggest to write own function for that to expand {Tab 3} to {Tab}{Tab}{Tab}?
It would not be possible to expand it if the functionality of {Key n} did not exist.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 29th, 2011, 12:06 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Anonymous wrote:
OK, I got one idea. What about allowing the expression mode and all numerical values in expression are regarded as delay.
Code:
SendInput, % "a" 1000 "{Enter}" 200 "b"
Expression mode is already allowed + this will send a number + this is not possible in current ahk design + we would break compatibility :!:
Anonymous wrote:
Quote:
Imagine {Tab 3} would not be possible, would you then also suggest to write own function for that to expand {Tab 3} to {Tab}{Tab}{Tab}?
It would not be possible to expand it if the functionality of {Key n} did not exist.
If there was no {Tab 2}, we would write a function that would replace it with {Tab}{Tab}:!:

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 29th, 2011, 4:15 pm 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
HotKeyIt wrote:
so we end up with many function doing same simple stuff.
I will try a different tack: will someone list a sample of threads creating, or asking for, these functions? Seeing their prevalence might help to demonstrate the need for this feature.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 29th, 2011, 5:53 pm 
Offline

Joined: December 26th, 2010, 7:40 pm
Posts: 4172
Location: Awesometown, USA
I have over 30 small functions adding tiny functionality that I've never posted because they are too small...

_________________
Autofire, AutoClick, Toggle, SpamWindow Control Tools
Recommended: AutoHotkey_L


Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 23rd, 2012, 8:25 am 
Offline

Joined: February 12th, 2012, 8:53 am
Posts: 21
PowerPro has had this feature for ages without any problems. It uses this syntax:

Quote:
{wn} - Wait n tenths of a second (eg {w1} to wait one tenth of a second)


Notice that there is no space following the 'w'. People use it all the time - just search the forum for {w1}, {w2} etc., you'll find hundreds of posts: http://tech.groups.yahoo.com/group/power-pro/messages/

I'm sure something similar could be implemented in AHK without breaking old scripts. Maybe use {sXXX} so that
Code:
Send, Alpha{s501}Omega
waits 501 ms between sending 'Alpha' and 'Omega'.

Please, please, please implement this feature!

Thanks.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 23rd, 2012, 8:43 am 
Philister wrote:
Send, Alpha{s501}Omega
That might actually work, it won't break backwards compatibility as in my little test just now {s501} is simply ignored e.g. nothing is sent. Not saying it should be implemented, but if it is this would be the way to do it I think.


Report this post
Top
  
Reply with quote  
PostPosted: May 23rd, 2012, 9:38 am 
Offline

Joined: January 22nd, 2009, 3:43 pm
Posts: 84
seems fair enough to me, doesnt break and for the reader distinguishable that its not like send {s 501} times, if the developers could be convinced of its
use then this seems like a rather fail safe way to implement


Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 23rd, 2012, 11:29 am 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
We should probably collect suggestions and do a poll to find out what majority of users thinks.

My vote goes definitely to number in {} brackets (that is what I have implemented in AHK_H).
{0} to {9} = send the digits as usual
{any digit higher 9} = sleep

It is very logical in my view and also does not break any scripts.
Also a sleep less than 16ms is not possible anyway.
Code:
Send, Alpha{501}Omega

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 24th, 2012, 9:09 am 
Offline

Joined: January 22nd, 2009, 3:43 pm
Posts: 84
Hotkeyit, i like that you are willing to expand the send, command, the convenience/cornerstone of AHK revolves imo about Hotkeys
so, while you are it, sometimes it bothers me that the send command triggers other hotkeys ie:
Code:
::ty:: Thank You
return

a:: send Hello
return

o:: send World
return

Typing in ty creates a rather nasty loop

So normally we would specifically have to turn off the looping key in advance:
Code:
 Hotkey a, off
Hotkey o off

and turn them back on/off (tedious) one at the time, it would be nice if instead you have a overruling option between brackets to say that the following text must be send literal as is (notifies ahk to temporarily deactivate the correspondinng hotkeys found in the send string and reactivate the hotkeys after the literal text is send.

For example using quotes
Code:
::ty::{"Thank You"}

a:: send {"Hello"}
return

o:: send {"World"}
return


or if a variable is used and we dont know in advance if the variable may contain keycombo to trigger other hotkeys
for example if supplied by user:
Code:
send {%userinput%}

or
Code:
a= !
b = x
c = %a%%b%
send {%c%}   ; the % between the brackets will notify ahk not only its a variable but also to turn of hotkeys that the string might contain
return

!x :: Exitapp ; will not be activated by sending %c%


thoughts?


Last edited by Scratch on May 24th, 2012, 9:39 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 24th, 2012, 9:27 am 
Just use the standard available options
Code:
::ty:: Thank You
return ; you don't need this actually for one liners

$a:: send Hello
return ; you don't need this actually

$o:: send World
return ; you don't need this actually


Report this post
Top
  
Reply with quote  
PostPosted: May 24th, 2012, 2:19 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8667
Location: Salem, MA
Guest is correct here. Some users may want the triggering of other keys. This is by design. The $ modifier tells the hotkey to (among other things) ignore simulated input.

</hijack>

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group