Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

**Videos Galore**


  • Please log in to reply
6 replies to this topic

Poll: Is this amzing or whatt (7 member(s) have cast votes)

Is this amzing or whatt

  1. OMG like fffing amazing!! (6 votes [85.71%])

    Percentage of vote: 85.71%

  2. Helll yez =) (1 votes [14.29%])

    Percentage of vote: 14.29%

  3. im a jerk so ill say no =[ (0 votes [0.00%])

    Percentage of vote: 0.00%

Vote Guests cannot vote
mailsummit2000
  • Members
  • 34 posts
  • Last active: Jun 03 2010 01:50 AM
  • Joined: 26 Jul 2008

i recently have been working on a script for Detaching Videos from the actual firefox pages, then the videos move to a new window, always on top, and you can go back to surfing the web, and switch tabs:

Posted Image

As you can see, its extremely useful, and you can have unlimited amounts of detachments. Also, its fun to detach things like, say, the Start Button, Gadgets from the DesktopSidebar, if you have one, and even the desktop icons itself =)

(Please note that the original script was taken from <!-- m -->http://www.donationc... ... tachVideo/<!-- m -->)

Features:
-Detaches what is under the Mouse when hotkey initiated
-Detach videos from Youtube, Google Videos, and other popular sites
-Also Detach other Elements, not just videos



Features I need help with:
-Making the Detached video window Resizeable-- video will resize with the window size
-I use Firefox 3.0.1 and currently it has a few bugs where when i give focus to the detached video, it will maximize firefox, and then firefox is unresponsive (my click doesnt do anything, but its not Frozen), and i have to minimize, then maximize ffox again to use it
-when closing detached video, it will reopen firefox and go to the tab it was ripped off from
-When closing detached video, it doesnt atm stay in place in the website, the detached object goes to position (0,0) and only if you scroll, it pops back to the original place
-Any ideas you might have ?

I am providing the modified code, which fixes some bugs, and adds more functionality to the original (plus, slimmer code):


#SingleInstance force
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
Process Priority,,High
DetectHiddenWindows, on
SetWinDelay,0
ProgramName=MasuA
counter=0
OnExit,EXIT
hotkey=#m
Hotkey,%hotkey%,HOTKEY
SetTimer,MOVE,500
Return

HOTKEY:
 SetTimer,MOVE,Off
 MouseGetPos,,,window,ctrl,2
 WinGetPos,wx,wy,ww,wh,ahk_id %window%
 WinGetPos,cx,cy,cw,ch,ahk_id %ctrl%
 WinGetTitle, wintit, A
 StringReplace,wintit,wintit,%A_SPACE%-%A_SPACE%Mozilla Firefox,,All
 current:=counter
 Loop,% counter+1
 {
  If gui_%A_Index%=
  {
   current:=A_Index
   Break
  }
 }
 If current>%counter%
  counter+=1
 Gui,%current%:+AlwaysOnTop +Resize +ToolWindow +LabelAllGui
 Gui,%current%:Show,X%cx% Y%cy% W%cw% H%ch%,%wintit%
 Gui,%current%:+LastFound
 gui:=WinExist("A")
 parent:=DllCall("SetParent","UInt",ctrl,"UInt",gui)
 WinMove,ahk_id %ctrl%,,0,0 ;,%cw%,%ch%
 ctrl_%current%:=ctrl
 gui_%current%:=gui
 parent_%current%:=parent
 window_%current%:=window
 w_%current%:=ww
 h_%current%:=wh
 SetTimer,MOVE,500
Return

MOVE:
 SetTimer,MOVE,Off
 Loop,%counter%
 {
  ctrl:=ctrl_%A_Index%
  If ctrl=
   Continue
  IfWinExist,ahk_id %ctrl%
   WinMove,ahk_id %ctrl%,,0,0
  Else
   Gui,%A_Index%:Destroy
 }
 SetTimer,MOVE,500
Return

AllGuiClose:
 SetTimer,MOVE,Off
 ctrl:=ctrl_%A_Gui%
 window:=window_%A_Gui%
 DllCall("SetParent","UInt",ctrl_%A_Gui%,"UInt",parent_%A_Gui%)
 Gui,%A_Gui%:Destroy
 WinMove,ahk_id %ctrl%,,0,0
 WinMove,ahk_id %window%,,,,% w_%A_Gui%,% h_%A_Gui%+1
 WinMove,ahk_id %window%,,,,% w_%A_Gui%,% h_%A_Gui%
 gui_%A_Gui%=
 ctrl_%A_Gui%=
 parent_%A_Gui%=
 SetTimer,MOVE,500
Return

WM_MOUSEMOVE(wParam,lParam)
{
  Global hCurs
  MouseGetPos,,,,ctrl
  If ctrl in Static9,Static13,Static17
    DllCall("SetCursor","UInt",hCurs)
  Return
}
Return

EXIT:
 SetTimer,MOVE,Off
 Loop,%counter%
 {
  ctrl:=ctrl_%A_Index%
  window:=window_%A_Index%
  If ctrl=
   Continue
  DllCall("SetParent","UInt",ctrl_%A_Index%,"UInt",parent_%A_Index%)
  Gui,%A_Index%:Destroy
  WinMove,ahk_id %ctrl%,,0,0
  WinMove,ahk_id %window%,,,,% w_%A_Index%,% h_%A_Index%+1
  WinMove,ahk_id %window%,,,,% w_%A_Index%,% h_%A_Index%
 }
 ExitApp
return
So, if i think this would be a great tool, and just trying to make it better. Please try to get the "Features I need help with" :O


garry
  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005
I like it
how can I minimize firefox automatically when hotkey marked video? (missing basic knowledge :) )
I'm experimenting , like to see video with predefined size and black background
here an example, watch TV, RadioRecord... can also download youtube (copy adress ctrl+c or rightclick )
<!-- m -->http://www.autohotke...topic27264.html<!-- m -->

Posted Image

mailsummit2000
  • Members
  • 34 posts
  • Last active: Jun 03 2010 01:50 AM
  • Joined: 26 Jul 2008
To minimize firefox or the current browser after detaching video, add
 WinMinimize, %wintit%
right above
 StringReplace,wintit,wintit,%A_SPACE%-%A_SPACE%Mozilla Firefox,,All

and as for this program, its pretty nice =)
but yeah, I'm still trying to fix these major issues

garry
  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005
aarghh, so easy.... thanks it works

now I can see 50 videos with blackscreen here:
<!-- m -->http://www.muvibee.c...im reeves&t=all<!-- m -->

while watching they are saved in Firefox-cache
can get the videos with script:
FireFoxCache-copy:
<!-- m -->http://www.autohotke...topic25694.html<!-- m -->

mailsummit2000
  • Members
  • 34 posts
  • Last active: Jun 03 2010 01:50 AM
  • Joined: 26 Jul 2008
Wow, thats a pretty nice site =D
but yeah, Im trying to make detachvideo to be resize friendly and to auto get lyrics (almost done with the lyrics)

summit
  • Guests
  • Last active:
  • Joined: --
I just realized this code
SetTimer,MOVE,500


MOVE:
 SetTimer,MOVE,Off
 Loop,%counter%
 {
  ctrl:=ctrl_%A_Index%
  If ctrl=
   Continue
  IfWinExist,ahk_id %ctrl%
   WinMove,ahk_id %ctrl%,,0,0
  Else
   Gui,%A_Index%:Destroy
 }
 SetTimer,MOVE,500
Return

does this mean it uses precious CPU cycles every half a second as long as the script runs?

automaticman
  • Members
  • 658 posts
  • Last active: Nov 20 2012 06:10 PM
  • Joined: 27 Oct 2006
Does this work also with Opera?