Jump to content

pieeater

Active Members
  • Posts

    167
  • Joined

  • Last visited

About pieeater

  • Birthday 12/06/1994

Recent Profile Visitors

503 profile views

pieeater's Achievements

Prodigy

Prodigy (4/7)

1

Reputation

  1. Made a fun little script to extract (make copies of) music files in a windows media player playlist to a folder in the scripts directory, i use this to sort through my music to figure out what songs i want on my phone. i made it copy the files so that it doesn't effect the original files, make sure you don't forget to clean up the directory. playlist gatherer.au3
  2. Thank you BrewManNH that explains everything
  3. so i was trying to get the the room name off of a gui i made using treeviewitems and for some reason $selectedRoom == 0 and $selectedRoom <> 0. i dont get it please explain $selectedRoom = GUICtrlRead(GUICtrlRead($TreeView1), 1) ConsoleWrite($selectedRoom&@CRLF); returns room name, which is never == to 0 If $selectedRoom <> 0 Then GUIDelete($Form1) _joinRoom($selectedRoom) EndIf this should work but for some reason it tells me that the room name is <> to 0, but it fails to execute the code correctly oh and since theres a huge no game policy im making the game thats why i needed this code.
  4. do you mean something like $string = '1234' ConsoleWrite(Number($string)&@CRLF) ;run this in scite to get the output or are you trying to turn something like 'abc' into numbers?
  5. Check out: StringToASCIIArray() StringFromASCIIArray() Asc() Example: $string = "asdasd" ConsoleWrite($string&@CRLF) $nString = StringToASCIIArray($string) $nString[3] = Asc("d") $string = StringFromASCIIArray($nString) ConsoleWrite($string&@CRLF) Hope it helps
  6. may i redirect you to the Reading and Comprehension Test?
  7. _IsPressed() will return true if the key is pressed, held, etc. and since it's only checking every 100 milliseconds or so it wont slow down windows at all. i usually put the sleep at 10 which is more than enough time, but here i didn't want the function called too many times.
  8. it isn't the best solution but using _IsPressed() is close to what you want. there are 2 problems though: 1. you have to loop it as an if statement. you cant execute it from anywhere like you can with HotKeySet() 2. it will execute multiple times if the button is held unless you have a Sleep(), which could effect usability. heres an example: #include <Misc.au3> Local $hDLL = DllOpen("user32.dll") $ctr = 0 While $ctr <> 50 If _IsPressed(12, $hDLL) Then If _IsPressed(30, $hDLL) Or _IsPressed(60, $hDLL) Then ;two here so it can be the num pad 0 or the other 0 _insertFunctionHere() Sleep(100) EndIf EndIf WEnd Func _insertFunctionHere() Send('1') $ctr += 1 EndFunc when i ran it and held down Alt+0 i got this output: 110110111001111010101101100110110101011110100110110101101101011101110011010 so it calls the function and still registers the keys.
  9. as far as ribbons go, if you press alt you can control most of the ribbon commands. i came up with this script as an example. go into word and press F1. HotKeySet("{F1}", "_meh") $close = False While $close <> True Sleep(10) WEnd Func _meh() send('!nti') $close = True EndFunc it will automatically open up the insert table options.
  10. does your guicreate look something like this? $Form1 = GUICreate("name of gui", 409, 98) if it does then your missing the next two parameters. they are optional but its the x and y coords. check out this http://www.autoitscript.com/autoit3/docs/functions/GUICreate.htm for a complete documentation on the function
  11. not sure about the rest but $BoxConfig[30] == $BoxConfig[31] because arrays start from the value zero. so $BoxConfig[0] == the first value, $BoxConfig[1] == the second and so on.
  12. Hello. I made an script for fun. All it does is combine elements of an array and comes up with an phrase. The phrase is just an meaningless insult meant to amuse you. My question: Is there an way to create the array without adding 150 lines that doesn't involve using files that must be found at run time? The challenge: Simplify this script as much as possible. All i want from the challenge is to learn other ways i could have made this script simpler. Good luck and i hope to learn something #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #region populate $var Dim $var[3][50] $var[0][0] = 'artless' $var[0][1] = 'bawdy' $var[0][2] = 'beslubbering' $var[0][3] = 'bootless' $var[0][4] = 'churlish' $var[0][5] = 'cockered' $var[0][6] = 'clouted' $var[0][7] = 'craven' $var[0][8] = 'currish' $var[0][9] = 'dankish' $var[0][10] = 'dissembling' $var[0][11] = 'droning' $var[0][12] = 'errant' $var[0][13] = 'fawning' $var[0][14] = 'fobbing' $var[0][15] = 'froward' $var[0][16] = 'frothy' $var[0][17] = 'gleeking' $var[0][18] = 'goatish' $var[0][19] = 'gorbellied' $var[0][20] = 'impertinent' $var[0][21] = 'infectious' $var[0][22] = 'jarring' $var[0][23] = 'loggerheaded' $var[0][24] = 'lumpish' $var[0][25] = 'mammering' $var[0][26] = 'mangled' $var[0][27] = 'mewling' $var[0][28] = 'paunchy' $var[0][29] = 'pribbling' $var[0][30] = 'puking' $var[0][31] = 'puny' $var[0][32] = 'qualling' $var[0][33] = 'rank' $var[0][34] = 'reeky' $var[0][35] = 'roguish' $var[0][36] = 'ruttish' $var[0][37] = 'saucy' $var[0][38] = 'spleeny' $var[0][39] = 'spongy' $var[0][40] = 'surly' $var[0][41] = 'tottering' $var[0][42] = 'unmuzzled' $var[0][43] = 'vain' $var[0][44] = 'venomed' $var[0][45] = 'villainous' $var[0][46] = 'warped' $var[0][47] = 'wayward' $var[0][48] = 'weedy' $var[0][49] = 'yeasty' $var[1][0] = 'base-court' $var[1][1] = 'bat-fowling' $var[1][2] = 'beef-witted' $var[1][3] = 'beetle-headed' $var[1][4] = 'boil-brained' $var[1][5] = 'clapper-clawed' $var[1][6] = 'clay-brained' $var[1][7] = 'common-kissing' $var[1][8] = 'crook-pated' $var[1][9] = 'dismal-dreaming' $var[1][10] = 'dizzy-eyed' $var[1][11] = 'doghearted' $var[1][12] = 'dread-bolted' $var[1][13] = 'earth-vexing' $var[1][14] = 'elf-skinned' $var[1][15] = 'fat-kidneyed' $var[1][16] = 'fen-sucked' $var[1][17] = 'flap-mouthed' $var[1][18] = 'fly-bitten' $var[1][19] = 'folly-fallen' $var[1][20] = 'fool-born' $var[1][21] = 'full-gorged' $var[1][22] = 'guts-griping' $var[1][23] = 'half-faced' $var[1][24] = 'hasty-witted' $var[1][25] = 'hedge-born' $var[1][26] = 'hell-hated' $var[1][27] = '' $var[1][28] = 'ill-breeding' $var[1][29] = 'ill-nurtured' $var[1][30] = 'knotty-pated' $var[1][31] = 'milk-livered' $var[1][32] = 'motley-minded' $var[1][33] = 'onion-eyed' $var[1][34] = 'plume-plucked' $var[1][35] = 'pottle-deep' $var[1][36] = 'pox-marked' $var[1][37] = 'reeling-ripe' $var[1][38] = 'rough-hewn' $var[1][39] = 'rude-growing' $var[1][40] = 'rump-fed' $var[1][41] = 'shard-borne' $var[1][42] = 'sheep-biting' $var[1][43] = 'spur-galled' $var[1][44] = 'swag-bellied' $var[1][45] = 'tardy-gaited' $var[1][46] = 'tickle-brained' $var[1][47] = 'toad-spotted' $var[1][48] = 'unchin-snouted' $var[1][49] = 'weather-bitten' $var[2][0] = 'apple-john' $var[2][1] = 'baggage' $var[2][2] = 'barnacle' $var[2][3] = 'bladder' $var[2][4] = 'boar-pig' $var[2][5] = 'bugbear' $var[2][6] = 'bum-bailey' $var[2][7] = 'canker-blossom' $var[2][8] = 'clack-dish' $var[2][9] = 'clotpole' $var[2][10] = 'coxcomb' $var[2][11] = 'codpiece' $var[2][12] = 'death-token' $var[2][13] = 'dewberry' $var[2][14] = 'flap-dragon' $var[2][15] = 'flax-wench' $var[2][16] = 'flirt-gill' $var[2][17] = 'foot-licker' $var[2][18] = 'fustilarian' $var[2][19] = 'giglet' $var[2][20] = 'gudgeon' $var[2][21] = 'haggard' $var[2][22] = 'harpy' $var[2][23] = 'hedge-pig' $var[2][24] = 'horn-beast' $var[2][25] = 'hugger-mugger' $var[2][26] = 'joithead' $var[2][27] = 'lewdster' $var[2][28] = 'lout' $var[2][29] = 'maggot-pie' $var[2][30] = 'malt-worm' $var[2][31] = 'mammet' $var[2][32] = 'measle' $var[2][33] = 'minnow' $var[2][34] = 'miscreant' $var[2][35] = 'moldwarp' $var[2][36] = 'mumble-news' $var[2][37] = 'nut-hook' $var[2][38] = 'pigeon-egg' $var[2][39] = 'pignut' $var[2][40] = 'puttock' $var[2][41] = 'pumpion' $var[2][42] = 'ratsbane' $var[2][43] = 'scut' $var[2][44] = 'skainsmate' $var[2][45] = 'strumpet' $var[2][46] = 'varlot' $var[2][47] = 'vassal' $var[2][48] = 'whey-face' $var[2][49] = 'wagtail' #endregion populate $var #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Press the button", 409, 98, 386, 242) $Button1 = GUICtrlCreateButton("Click Me", 160, 56, 75, 25) $Input1 = GUICtrlCreateInput("", 8, 16, 393, 32, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $str = 'Thou '&$var[0][Random(0,49,1)]&' '&$var[1][Random(0,49,1)]&' '&$var[2][Random(0,49,1)] GUICtrlSetData($Input1, $str) EndSwitch WEnd
  13. take a look at the TimeInit & TimerDiff function
  14. what do you want to record the arrow keys for?
  15. well this will make your gui work. i dont really see the point of making the select gender a button #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=gender select.kxf $Form2 = GUICreate("Select your Gender", 279, 213, 468, 254) $GroupBox1 = GUICtrlCreateGroup("", 48, 33, 185, 129) GUICtrlSetBkColor(-1, 0x008080) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("Male", 54, 107, 75, 25) GUICtrlSetBkColor(-1, 0x0054E3) $Button2 = GUICtrlCreateButton("Female", 149, 108, 75, 25) GUICtrlSetBkColor(-1, 0xFF00FF) $Button3 = GUICtrlCreateButton("Select Your Gender", 85, 52, 115, 25) GUICtrlSetBkColor(-1, 0x00FF00) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $Button1 _maleFunction() Case $Button2 _femaleFunction() EndSwitch WEnd Func _maleFunction() ;insert code here EndFunc Func _femaleFunction() ;insert code here EndFunc
×
×
  • Create New...