Jump to content

Vegar

Active Members
  • Posts

    178
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Vegar's Achievements

Prodigy

Prodigy (4/7)

0

Reputation

  1. Dont get any errors in the console... i get the message from windows "Autoit had stopped working"
  2. i've looked at it.. but cant find a solution.. i've tried _Date_Time_SetSystemTime and _date_time_EncodeSystemTime If i write for example _Date_Time_EncodeSystemTime(11, 11, 2011, 10, 11, 11) the date/time wil change... but how can i change it to the date i chose in the Guictrlcreatedate??
  3. Hello.. why does autoit crash when i try to run this? think there is something i'm doing wrong the the _Date_Time_SetSystemTime Func tidfunc() Local $date, $msg, $setttdato, GUICreate("Endre Dato til:", 200, 200, 800, 200) $date = GUICtrlCreateDate("2011/11/11", 10, 10, 185, 20) $knapp = GUICtrlCreateLabel("(Lukk Vindu når du har valgt dato)", 20, 100, 200, 20) GUISetState() Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE $svar = MsgBox(4, "Still dato til:", GUICtrlRead($date)) if $svar = 6 Then $settdato = _Date_Time_SetSystemTime(GUICtrlRead($date)) Else GUIDelete() endif
  4. Hello... Having some trouble with licenses that are expired... found the solution with just adjusting the clock back.. but is it possible to make a scritp that only makes that one process/programm think that it is 2011 or something.. and all other programs think the time is the correct time. this is a program that is turned on alot, and if the clock is years off it makes a problem for many of my other programs and websides.
  5. Helloo I have this heating element i want to controll with a SSR (Solid State Relay) for those ho dont know what that is, so is it just a relay that only needs 3-32volts to activate the relay (switch on the relay) and i want to controll my heating element with pulses from my usb... i want to controll this with a slider (0-100%) for instance if i set the slider to 10% and i run 1000ms cycles that it would be "activated" 100ms of that... 30% 300ms of 1000ms and so on... and maybe make the script so i can adjust the cycle time. And if not possible with USB, is there anything else i could use? ( such as this 15pin Monitor plug i have) But just have to ask you first if this is possible?? and how?
  6. Superb, worked perfect, Thank you!
  7. hmm, yeah i see ... "@@ Debug(5) : $h = True" But what is the best/ easyest solution to this? .. sorry, i have'nt been scripting for a while
  8. $h = 18 or 20 or 22 $m = 15 or 30 or 45 $S = 00 or 30 While 1 If @hour=$h and @min=$m and @sec=$s Then sleep (1000) _somefunc() Else Sleep(10) EndIf Wend Func _somefunc() MsgBox(0,"",@HOUR&"h "&@MIN&"m "&@SEC&"s "&@msec&"ms") EndFunc hmm
  9. Ok, After givin up 7-8 times trying to make this work, i actualy think i have found a way.. i tried many ways using _ispressed functions a stuff like that.. but when giving up on that i went back to what i originaly tried... And if i use the Windows-Button it worked preaty simple actualy: HotKeySet("#{RIGHT}","_right") While 1 Sleep(100) WEnd func _right() HotKeySet ("#{RIGHT}") ControlSend ("Musicprogramtitle","","","^{right}") HotKeySet("#{RIGHT}","_right") EndFunc
  10. Hmm, did not get anything to work with the ALT-key :/
  11. Yeah, i have already made a script witch works like that.. that i have to release the Ctrl between each song ... cind of just that i wanted to get rid of... And i woundered if there is any way to do it with some _ispressed functions?
  12. hmm, i'm not understanding this ... i've trid just what you say, and exactly what it says in the help file ... but i'm not getting it to work :/ This works only for changeing 2 songs?! :S HotKeySet("^{RIGHT}","_right") While 1 Sleep(10) WEnd func _right() HotKeySet ("^{RIGHT}") ;1: unbind ControlSend ("Musikprogram","","","^{right}") ;2 Send hotkey HotKeySet("^{RIGHT}","_right");3 rebind EndFunc
  13. Hmm, turned in to a litle problem with this "Unbinding" Now it works to change 2 songs, but then i have to release the Ctrl button to change more songs :/ but at least now the Ctrl button did not get "Stuck", dow evrything else worked fine.. but i'm unsure if i understand the "Unbinding" concept? anyways, here is what i tried: HotKeySet("^{RIGHT}","_right") HotKeySet("^{left}","_left") While 1 Sleep(10) WEnd Func _right() ControlSend ("Spotify","","","^{Right}") call ("unbind") EndFunc Func _left() ControlSend ("Spotify","","","^{left}") call ("unbind") EndFunc func unbind() HotKeySet("^{RIGHT}","_right") HotKeySet("^{left}","_left") EndFunc
  14. yeah it works alright... but when i try just that with ControlSend when i'm finnished changeing song it seems like the Ctrl Button is stuck ... so it holds the Ctrl button down until i hit the button myself again, then it "realeses" HotKeySet("^{RIGHT}","_RIGHT") HotKeySet("^{LEFT}","_LEFT") HotKeySet("{esc}","_exit") While 1 Sleep(10) WEnd Func _right() Controlsend ("MusicPlayerTitle","","","^{Right}") EndFunc Func _left() Controlsend ("MusicPlayerTitle","","","^{Left}") EndFunc Func _exit() Exit EndFunc
  15. Hmm, this made the song change if i only hit the Ctrl button ... nad i dont know what happend but seemd like the Ctrl was stuck or something, because the pc acted all weird after i had run the script.. like if the Ctrl button was down... the ide'a was that if i hold Ctrl and then hit Right Arrow then it changes song, and i can hold the Ctrl button and just skip to next song by pushing the right arrow again without realysing the Ctrl button between each song.. I tried this #include <Misc.au3> $dll = DllOpen("user32.dll") $key = 11 ;$key = 11 (CTRL key) $switchkey = "^{RIGHT}" ;Ctrl + "Right Arrow" to change to next song While 1 Sleep ( 50 ) If _IsPressed(11, $dll) and _IsPressed (27, $dll) Then ;11 = Ctrl ... 27 = Right Arrow ControlSend ("MusicProgramTitle","","",$switchkey) EndIf WEnd DllClose($dll) But with these i had to realease the Ctrl button between each song :/
×
×
  • Create New...