topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Saturday December 14, 2024, 7:11 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

Author Topic: IDEA: really simple script  (Read 4984 times)

jahrastafari

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
IDEA: really simple script
« on: October 01, 2008, 05:44 PM »
using autohotkey
start script with a hotkey. output random number in a document. hit enter. wait a second. hit delete 2 times. repeat until hotkey is pressed again.

I just started trying this scripting stuff. I don't really have much yet.. just wanted to know what it would look like. thanks for any help!


jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: really simple script
« Reply #1 on: October 01, 2008, 06:24 PM »
something like this should do it (untested!):

#persistent
flag:=true
return

f10::
if(not flag)
{
flag := true
return
}
flag:=false
loop
{
random,var,0,10
send,%random%{enter}
sleep,1000
send,{del}{del}
if (flag)
  break
}
flag:=false
return

« Last Edit: October 02, 2008, 05:05 AM by jgpaiva »

jahrastafari

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: IDEA: really simple script
« Reply #2 on: October 01, 2008, 06:57 PM »
doh. doesn't output any numbers. just blanks.

jahrastafari

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: IDEA: really simple script
« Reply #3 on: October 01, 2008, 09:25 PM »
ok i figured it out. thanks for the help.


#MaxThreadsPerHotkey, 2
return

f10::
Flag := !Flag
If !Flag
  Return
Loop 
{
  random,var,0,10
  send,%var%{enter}
  sleep,1000
  send,{del}{del}
  if !(flag)
    break
}
flag := false
return

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: really simple script
« Reply #4 on: October 02, 2008, 05:06 AM »
 :D glad to see it's fixed!