Jump to content

beestinga

Active Members
  • Posts

    47
  • Joined

  • Last visited

beestinga's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. So, my wife is a nurse and she works 12-hour night shifts, 7pm-7am. Entering her schedule each month is typically a pain because it means clicking on each day, creating an event, editing that event, and setting all of the same parameters over and over again (same times, no notifications, show me as available, etc.) - the only thing that changes is the day. So, I whipped this up real quick 'n' dirty. It's not very good, as it doesn't use FF.au3 to make sure that the pages load or to enter things in. If, for example, you have 2 notifications on by default instead of 1, then this won't work for you. To use it, just make a text file ("dates.txt") on the root of your c: drive with a different date (no year) on each line. Open up your google calendar and run the program. You'll also need to tell it where to click and enter the specifics about your event. Actually, this may be entirely useless to anyone but me.....but, oh well, here it is. It's taken me about 4x as long to write this write-up as it did to code the thing. #Include <File.au3> func fillEvent($date) WinActivate("Google Calendar") MouseClick("left",53,234) ;clicks create event sleep(1000) ;short delay for the page to change Send("AJ Work{TAB}"&$date&"/2010{TAB}1900{TAB}700am") for $j = 1 to 17 ;tab down to the remove reminder Send("{TAB}") next Send("{ENTER}{TAB}{TAB}{UP}") ;remove reminder, set available and Send("{TAB}{TAB}{TAB}{TAB}{Enter}") Sleep(1000) ;snooze until you get back to the main calendar page endfunc $file = "c:\dates.txt" FileOpen($file, 0) For $i = 1 to _FileCountLines($file) $date = FileReadLine($file, $i) fillEvent($date) Next FileClose($file)
  2. seems kind of involved - I'm imagining a 2-dimensional array in which the first dimension is the character, the second is the topleft position for that word, and the third is the bottom right position, eg: OutputArray[0][0] = word OutputArray[0][1] = topleft coordinate in x y format OutputArray[0][2] = bottomright coordinate in x y format OutputArray[1][0] = next word OutputArray[1][1] = topleft coordinate in x y format OutputArray[1][2] = bottomright coordinate in x y format etc...? I'm not sure if the the objects contain that much information. Also, Szhlopp, is there a reason you resized the image to 600 x 600? Couldn't that, in some instances be enlarging it too much? or even compressing it? I'm having trouble testing this on extremely small regions - could this be why? Really though, this is a great program, and both of you guys have done a great job. You should be very proud.
  3. Func _GrabTable($oArray,$oDimension) Local $TempArray[UBound($oArray, 2)][UBound($oArray, 3)] For $x = 0 To UBound($TempArray, 1) - 1 For $i = 0 To UBound($TempArray, 2) - 1 $TempArray[$x][$i] = $oArray[$oDimension][$x][$i] Next Next Return $TempArray EndFunc Pretty bare-bones stuff. Just tell it which 3-d array you want to grab a table from, and which 2D array you want, and it'll output it. Linux wrote this. I just put it into a function in case anyone out there wants to use it.
  4. Hey, thank you guys for your help. I may have been able to hack something together in many hours, but I wasn't familiar with the UBound (command? macro? what is that thing?) Anyway. I'll take a look at this and maybe make a user-friendlier UDF out of it. Thanks, Jason To make the above code work, would I need to define $CT as a counter, maybe do: Local $TempArray[UBound($Glob_Current_Troops_IN, 2)][UBound($Glob_Current_Troops_IN, 3)];Create a 2D Table with the information of a 3d table For $x = 0 To UBound($TempArray, 1) - 1 $CT=0 For $i = 0 To UBound($TempArray, 2) - 1 $TempArray[$x][$i] = $Glob_Current_Troops_IN[$CT][$x][$i] Next $CT+=1 Next _ArrayDisplay($TempArray) ??
  5. Thanks, DjDeep for your ideas. I guess I'll need to whip something up. -Jason
  6. hey asshole, sorry i wasn't in here in the 15 minutes between when i got a response and you spotted the thread.you really have nothing better to do with your time? seriously, get a life. Have you looked at my posting history. I'm not any sort of uber-1337 programmer, but when I whip something together, I post it in the examples forum. I'm sorry. I know you're just a troll and trolls don't deserve acknowledgment, but...well...today's been kind of a pain. Anyway, psalty, to answer your question: I created the array. I'm working with a series of datasets. Basically, 3 5x5 tables, and I need to reference one cell at a time out of the three tables, so i punched the tables in manually into a 3x5x5 array and now I need to output the tables to something like a spreadsheet (which I can do with excelcom when I have 2d arrays.
  7. Hey, I've got a 3 dimensional array (3x5x5), and I can't really do anything with it as it is (arraydisplay only likes 2d arrays, the excelcom arraytosheet udf also only works with 2d arrays), and I was wondering if such a piece of code has been written to split a 3x5x5 array into 3 5x5 arrays, or something like that. I've searched around without any luck, and such autoit mysticism is beyond my grasp. Thanks, Jason
  8. Is this a bot?
  9. Searching around, I found a few places that people were requesting such features as _ArraySum, _ArrayMult, etc. did such a tool ever come to fruition. It would be nice to be able to add a number to all elements of an array, or to add two arrays together with a single function. I'm most interested in multi-dimensional arrays, but i could see single dimension arrays benefiting from this as well. -Stinga
  10. Oh, thanks guys! This is exactly what i needed!Last thing - is there a way to force it to record how long the mouse pauses at certain places or how long it holds down the mousebutton? Thanks again for your help!
  11. Thanks for the advice, Soul, but I don't seem to have AU3Recorder in my SciTe tools menu, using the latest beta install.
  12. I seem to remember several years and versions ago, one of the primary features of autoit was an intuitive and powerful macro recording feature, whereby a user could hit record, perform several actions, and then stop recording. The user could then use the, at that time much more elementary, autoit scripting language to modify the script and hack it up. Am I completely confused, or does such a tool not exist any more? I would very much like to have a utility that record my mouse location, how long i hold things for, keypresses, etc. I realize that I can do this myself with the use of the window info utility, but I could swear that I remember using something like this in the past. I know that there are other macro recording softwares out there, but I would like to have the power of autoit and the ability to hack 'n' slash my macros to pieces after recording. -Confused in TX
  13. Just as the topic says. You can read about the Monty Hall Problem here: http://montyhallproblem.com/ I refused to believe it so I wrote a program to simulate and research for myself. Boy were my cheeks red. Anyway, here it is, pretty simple and straight forward. ;Monty Hall Simulator ;Not Switching $wins=0 $losses=0 $runs=0 For $k=1 to 10000 $winningdoor=random(1,3,1) $chosendoor=random(1,3,1) $eliminated=random(1,3,1) if $eliminated=$winningdoor or $eliminated=$chosendoor Then While $eliminated=$winningdoor or $eliminated=$chosendoor $eliminated=random(1,3,1) WEnd EndIf If $winningdoor=$chosendoor Then $wins+=1 if $winningdoor<>$chosendoor Then $losses+=1 $runs+=1 Next MsgBox(0,"All Done!","You won "&$wins&" times and lost "&$losses&" times out of "&$runs&" runs!") ;Now we switch when we get the chance $wins=0 $losses=0 $runs=0 For $k=1 to 10000 $winningdoor=random(1,3,1) $chosendoor=random(1,3,1) $eliminated=random(1,3,1) if $eliminated=$winningdoor or $eliminated=$chosendoor Then While $eliminated=$winningdoor or $eliminated=$chosendoor $eliminated=random(1,3,1) WEnd EndIf $newchosen=random(1,3,1) If $newchosen=$eliminated or $newchosen=$chosendoor Then While $newchosen=$eliminated or $newchosen=$chosendoor $newchosen=random(1,3,1) WEnd EndIf If $winningdoor=$newchosen Then $wins+=1 if $winningdoor<>$newchosen Then $losses+=1 $runs+=1 Next MsgBox(0,"All Done!","You won "&$wins&" times and lost "&$losses&" times out of "&$runs&" runs!") Exit
  14. thanks to both of you guys! -Beestinga
×
×
  • Create New...