Jump to content

Draygoes

Active Members
  • Posts

    4,212
  • Joined

  • Last visited

  • Days Won

    19

Community Answers

  1. Draygoes's post in Let your S.O. know how many times you've thought of them over discord! (Well commented, simple example) was marked as the answer   
    Here is a well commented and simple example that beginners should be able to follow. It deals with a lot of beginner consepts, a ton of them being consepts I started with.
    You must have discord running, and you will have to modify the Window title names, but it should otherwise work right out of the box for you.

     
    ;This will help us keep a running tally of how often we've thought about our S.O. ;We could do this totally in ram, but we would lose our count any time the program crashes or restarts. ;This allows us to reset our count according to our wishes. If Not FileExists( "count" ) Then ;If file doesn't exist, FileWriteLine( "count", "0" ) ;create the file with the number 0 EndIf ;This sets * on the numberpad as our hotkey to launch the main function. ;The loop just gives us a reason to be running in the background. Script can't end until we want it to or our hotkey isn't being watched for. HotKeySet("{NUMPADMULT}", "KissAndTell"); * on the numberpad. While 1 Sleep( 10000 ) WEnd Func KissAndTell() ;Create Function KissAndTell $count = FileReadLine( "count" ); Get number of times executed. $count = $count + 1; Account for this time by adding one. FileDelete("count"); Delete our file to ensure blank slate. FileWriteLine( "count", $count );write current count to file, recreating it. Do;Keep... WinActivate( "TheNuggetQueen - Discord");... activating this window until... Until WinActive( "TheNuggetQueen - Discord" );... we see that it's active. Send("My program is recording how much I think about you. I've thought about you " & $count & " times today! I love you!",1) Send("{ENTER}") EndFunc ;EndFunction  
  2. Draygoes's post in I can't seem to get my code to run my portable Virtual Box. was marked as the answer   
    Ok, wait. I got it solved.

    For some crazy reason, I had to #RequireAdmin to run a program in a folder on my desktop. Anyone have any idea why?

    Thanks for your input @Nine
×
×
  • Create New...