Jump to content

TheOnlyOne

Active Members
  • Posts

    178
  • Joined

  • Last visited

About TheOnlyOne

  • Birthday 12/18/1992

Profile Information

  • Location
    Denmark

Recent Profile Visitors

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

TheOnlyOne's Achievements

Prodigy

Prodigy (4/7)

0

Reputation

  1. Thanks for the answer, however that only has the two same buttons as _ispressed. Guess I will need to download some drivers to my mouse and see if their software can make a macro of some sort, unless someone else got a sugestion?
  2. Hi, I am trying to make some stuff easier for me so when i click on the buttons on the side of my mouse it does some function. I have 4 extra buttons on my mouse and would like to utilize all of them. I have looked at _ispressed but that only seems to have two: 05 X1 mouse button 06 X2 mouse button Those two works fine, I just want to know if there is a way to check if the other two buttons on my mouse is clicked ?
  3. Oh god i feel so stupid .. my reset function didn't have any parameters.. Well thanks for your help, would properly been stuck with this for atleast a few hours more without it.
  4. Okay I might have found the problem with why the hotkeyset didn't work. I took another look at your first example @SadBunny and saw you used -1 for the hwnd. I thought you had to give it a GUI reference so i had created one like this, with the timer referencing it as shown earlier: $gui = GUICreate("", 0, 0) $globaltimer = _Timer_SetTimer($gui, Random(6000 * 2, 6000 * 5, 1), "reset") I tried changing $gui to -1 and now the hotkey works even after 60+ seconds why is that? The function reset does not seem to be called though ? Tried chaning it to 10 seconds instead of a random generated number but with the same result? Func reset() _Timer_KillTimer($gui, $globaltimer) MsgBox(0, "", "in reset") ... EndFunc ;==>reset the callback function never seems to be called in your example nether
  5. Yea I might have to rethink the solution.. just annoys me because I feel like it should work. I just tried to add a tooltip to the while loop in oneRow() with the timerdiff inside. So the hotkey apperently works until 30-40 seconds have passed ?? there is no other code being executed other than the code inside the loop ..
  6. Hmm not sure I can do that, I see that your example is working for me too. I have this code calling my function $return = 0 For $i = 0 To 5 If $pause = True Then pause() EndIf MsgBox(0,"","before one row") $return = oneRow($i) MsgBox(0,"",$return) If $return = 232 Then Return 232 Sleep($waitDelay) Next the msgboxes is something i inserted for debugging purposes. I also tried to add MsgBox(0,"","first") to the top of the oneRow function. So when i run the code it runs as expected the first time, shows "before one row" messagebox and afterwards the "first" msgbox. Then after 5 seconds it actually shows the "before one row" msgbox again so it must have passed one of my pixelgetcolor calls(even though the status isnt correct yet). So i tried adding this to the if block that passes If PixelGetColor(1100, 310) = 0x707070 Or PixelGetColor(901, 305) = 0xE0E0E0 Or PixelGetColor(1043, 383) = 0xC6C6C6 Then MsgBox(0,"","sucess " & @crlf & hex(PixelGetColor(1100, 310)) & @crlf & hex(PixelGetColor(901, 305)) & @crlf & hex(PixelGetColor(1043, 383))) Sleep(100) Send("{esc}") Sleep(1000) EndIf But the msgbox is never shown. If i add an empty msgbox it is shown. I tried without the hex call but with the same result, is the pixegetcolor function returning errors maybe, i have never seen that before? Another weird thing is after it shows the "before one row" msgbox the second time it doesnt show the next msgbox at the top of oneRow function ? As you said my code is properly to messy atm. I would have a hard time making a reproducable example which is not very good..
  7. So currently I have some code waiting for a status to change(there is different indicators to check if this status has changed) Func oneRow($count) $globaltimer = _Timer_SetTimer($gui, 60000*10, "reset") $errTimer = TimerInit() While (1)         If PixelGetColor(1117, 326) = 0xC6C6C6 Then ExitLoop (1)         Sleep(500)         MouseClick("right")         Sleep(600)         If PixelGetColor(1117, 326) = 0xC6C6C6 Then ExitLoop (1)         If TimerDiff($errTimer) > 5000 Then             If PixelGetColor(1100, 310) = 0x707070 Or PixelGetColor(901, 305) = 0xE0E0E0 Or PixelGetColor(1043, 383) = 0xC6C6C6 Then                 Sleep(100)                 Send("{esc}")                 Sleep(1000)             EndIf         EndIf     WEnd .... EndFunc   ;==>oneRow The two timers is for error checking. This works just fine the problem comes when I go into the while 1 loop, my hotkeys at the top of the program seems to stop working, for an example HotKeySet("{f1}", "stop") Func stop() Exit EndFunc ;==>stop Does not work at all after the while loop. The globaltimer is never called even though i tried setting the delay all the way down to 3 seconds. So I thought that maybe one of the function I use is blocking so the timer would never be called/the hotkey wouldn't work? if i make an delay just before the while loop the hotkey works just fine. Oh and the errTimer is supossed to not reset after 5 seconds but should keep making the check it does if five seconds have passed
  8. I got a problem when I try to use _GraphGDIPlus_Set_Range#() on the same graph multiple times(I only have one graph so what RTFC says above shouldn't be the problem ?) I have tried to clear it with _GraphGDIPlus_Clear() but this only removes the graph not the ticks. Is it possible to do this without destroying the graph and then recreating it?
  9. Nvm I found a solution. By chaning the _ienavigate to youtube.com it will allow me to see the embedded video.
  10. uhm yea, pretty much like this #include <ie.au3> $buildHtml = "" $buildHtml &= "<HTML>" & @CRLF $buildHtml &= "<BODY>" & @CRLF $buildHtml &= '<iframe width="560" height="315" src="https://www.youtube.com/embed/QcIy9NiNbmo?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>' & @CRLF $buildHtml &= "</BODY>" & @CRLF $buildHtml &= "</HTML>" $gui = GUICreate("",300,300,-1,-1) $ie = _IECreateEmbedded() GUICtrlCreateObj($ie,0,0,200,200) GUISetState(@SW_SHOW) _IENavigate($ie,"google.com",1) sleep(200) _IEDocWriteHTML($ie,$buildHtml) _IEAction($ie, "refresh") while(1) sleep(5) WEnd
  11. bump(I know it hasn't been 24 hours but I thought it was ok since there was all this spam yesterday and my post pretty much got buried )
  12. Hi. I am trying to create an embedded ie window and have successfully done so. First I change the site to google.com (need to navigate before i can write html to the embedded window) Then i use _IEDocWriteHTML to make an embedded youtube link. The problem is I get an error when trying to play the song -> So I tried googling this and it seems like I need to specify a Referer or youtube will block me(on certain videos) I once again turned to google and found this thread https://www.autoitscript.com/forum/topic/165108-ie-referrer/ and this snippet of code $oIE.Navigate2("http://whatismyreferer.com", Default, Default, Default, 'Referer: "newwebsite.com"')but I am not quite sure what I should fill in here. I have never heard of referer before this problem occoured, but isn't it what tells youtube where the user watching the video came from? how can i specify this when it is just a script running? this is the code i use to build the html i use to create the embedded link to youtube local $buildHtml = "" $buildHtml &= "<head>" & @CRLF $buildHtml &= "<body>" & @CRLF $buildHtml &= '<iframe width="300" height="300" src="https://www.youtube.com/embed/'& $split[1] &'?rel=0&amp;showinfo=1" frameborder="0" allowfullscreen></iframe>' $buildHtml &= "</body>" & @CRLF $buildHtml &= "</head>" & @CRLFsplit[1] contains the id of the video. I would like some help to how I can resolve this and maybe an answer to if my understanding of a referer is correct(and/or maybe a more in depth answer)?
  13. Ah yes, this is exactly what I needed Thanks!
  14. Okay I should be more specific. I want to be able to hide and show the Control. With your example I would have to change the size of the control over and over again just as with setstate
×
×
  • Create New...