AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PLEASE HELP ME BY MAKING THIS SCRIPT ASAP

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
OTOLIA
Guest





PostPosted: Mon Apr 25, 2005 9:46 pm    Post subject: PLEASE HELP ME BY MAKING THIS SCRIPT ASAP Reply with quote

hi..
i am really in need of this script.. i must thank in advance cause i am being a bit selfish here bu not even trying to make this script (actually i'vegot my exams next month... and i can study without music in the background ..hehe).. so the problemis that when i installed a new hard and a window in my pc... my SOngs playlist isnot playing a single song... (all the drive letters are messed up)... so i need a script that reads a text file (i'll convert the playlist.m3u to txt by formatting a bit so it will contain the PREVIOUS path of the song in lines... line by line) and then it searches for the song (songname.mp3) from my all drive letters and then when it finds one...it will copy the file to a folder... (it can be done faster if the script "indexed"all the drives first to a variable or file"... so please help me..
i thank in advance from the bottom ofmy heart... but please send reply ASAP
Back to top
TeknoMusicMan



Joined: 14 Apr 2005
Posts: 188
Location: Wisconsin, USA

PostPosted: Mon Apr 25, 2005 10:28 pm    Post subject: Reply with quote

It's not that I'm unwilling to help you but wouldn't it be easier to just recreate the playlist. I'm assuming its in Winamp.
_________________

"Make it idiot-proof, and someone will make a better idiot."
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
garry



Joined: 19 Apr 2005
Posts: 1186
Location: switzerland

PostPosted: Mon Apr 25, 2005 10:34 pm    Post subject: Reply with quote

maybe I didn't understand what you want (my english)
here two ideas to create a playlist

type in *.mp3
select Folder
can play with doubleclick or play
see mp3 files in test33.m3u
Code:

;search01.ahk 2005-04-25 garry
;from MP3-player project
#NoTrayIcon
Gui, Font, S8 , Verdana
Gui, Color, 000000

Gui, Add, ListBox, x10 y10  w580 h360 +HScroll AltSubmit vMyListBox gMyListBox
Gui, Add, Button, x460 y420 w50 h20,Search
Gui, Add, Button, x516 y420 w80 h20,Start/Open

Gui, Font, S8 cwhite, Verdana
Gui, Add, Edit, x2 y390 w580 h20 ReadOnly vC,
Gui, Add, Text, x6 y422 w120 h20, [*.txt]
Gui, Font, S8 cblack, Verdana
Gui, Add, Edit, x45 y420 w400 h20 vA

Gui, Show, x200 y0 w600 h450, SEARCH
maxxpic := 0
;----------a clock ----------------
{
Gui, Font, S8 cwhite, Verdana
Gui, Add, Text, x200 Y370 vD , %A_DDDD%  %A_YYYY%-%A_MM%-%A_DD% %a_hour%:%a_min%:%a_sec%
SetTimer, RefreshD, 1000
RefreshD:
GuiControl, , D, %A_DDDD%  %A_YYYY%-%A_MM%-%A_DD% %a_hour%:%a_min%:%a_sec%
return
}
Return

;------Search Function------
buttonSearch:
filedelete test33.m3u
Gui, Submit, NoHide
if a=
{
a=*.*
}

SplashTextOn, , ,Search
SplashTextOff


SetBatchLines, 5ms
FileSelectFolder, MusicFolder
If MusicFolder=
 {
 }
Else
 {
  IfGreater, maxxpic, 1
    {
      Loop, %maxxpic%
      {
      Pic%A_Index%=
      }
      PicSorted=
    }
  Loop, %MusicFolder%\%A%, 0,1
  {
    PicSorted = %PicSorted%%A_LoopFileFullPath%|
    maxxpic := A_Index
  }
  Sort, PicSorted, D| \
  Loop, Parse, PicSorted, |
  {
    Pic%A_Index% = %A_LoopField%
    xstep = %A_Index%
    Loop, %A_LoopField%
    {
      If xstep = 1
        GUIControl,, ListBox1, |%A_LoopFileName%|
      Else
        GUIControl,, ListBox1, %A_LoopFileName%
        fileappend,%A_LoopFileFullPath%`r`n,test33.m3u
    }
    xstep=
    PicSorted=
  }
 }

Return

;----------
MyListBox:
GuiControlGet, MyListBox
if A_GuiControlEvent = Normal
{
   StringTrimLeft, FullPath, Pic%MyListBox%, 0
   GuiControl, , C, "%FullPath%"
}
if A_GuiControlEvent = DoubleClick
{
   StringTrimLeft, FullPath, Pic%MyListBox%, 0
   Cursel := MyListBox
   CurList = Pic
   Goto, buttonStart/Open
}
return

;----------
buttonStart/Open:
GuiControl, , C, "%FullPath%"
run,"%FullPath%"
return

GuiClose:
ExitApp

the same with DOS, sorted by pathname and date
create_m3u.bat
Code:

rem create_m3u.bat
dir C:\*.mp3 /OD /B /S  >country03.m3u
pause
Back to top
View user's profile Send private message
OTOLIA
Guest





PostPosted: Mon Apr 25, 2005 10:37 pm    Post subject: Reply with quote

well...
the playlist contains 400+ songs... and they are not in a single folder on a single drive...thats why I REALLY NEED A SCRIPT... and the playlist is in MEdia player... but i save it as a *.m3u too... and then formated it (removed all the text other than just the path of files .. and made it a text file)..
Back to top
Guest






PostPosted: Mon Apr 25, 2005 10:44 pm    Post subject: Reply with quote

Thanks garry.. but thats not what i asked for... Sad ..
Back to top
OTOLI(PROBLEM NOT SOLVED)
Guest





PostPosted: Mon Apr 25, 2005 11:58 pm    Post subject: Reply with quote

someone please...... Crying or Very sad
Back to top
OTOLIA
Guest





PostPosted: Tue Apr 26, 2005 2:15 am    Post subject: Reply with quote

ok ... now i think no one understood my problem.. so i'll just cut the crap .. and write it simply:
I NEED A SCRIPT THAT WILL READ A TEXT FILE THAT CONTAINS SOME PATHS OF FILES, AND THEN IT WILL SEARCH THE FILE FROM MY ENTIRE SYSTEM (the script can cut the string of the name only from each line : c:\my docs\mp3\back.mp3 and then just search back.mp3" AND WHEN IT FINDS IT IT WILL COPY THAT FILE TO A SPECIFIC FOLDER. i think it can be done easily if the script first "indexed" my hard drive..... i think its clear now Rolling Eyes
Back to top
OTOLIA
Guest





PostPosted: Tue Apr 26, 2005 4:16 am    Post subject: Reply with quote

and the files are not where the paths say they are... thats why the script must use their name and search...
Back to top
corrupt



Joined: 29 Dec 2004
Posts: 2436

PostPosted: Tue Apr 26, 2005 5:05 am    Post subject: Reply with quote

FileRead
Loop, Parse
SplitPath
Loop, FilePattern
FileCopy
Back to top
View user's profile Send private message Visit poster's website
OTOLIA
Guest





PostPosted: Tue Apr 26, 2005 5:21 am    Post subject: Reply with quote

Mad Sad Confused Shocked Evil or Very Mad Question Exclamation thats FANTASTIC...what a community...it says "Lets help each other out" thats why i asked for u guys to make this script...and i clearly said that i cant make it cause i have to study... otherwise after spending some time i could make it... and now here is what iget

FileRead
Loop, Parse
SplitPath
Loop, FilePattern
FileCopy

GREAT GUYS...at least u could read my post (first one) so u knew my problem fully.... instead of reading the last post and sending some commands...which i knew already... so i have to make it by myself... (by just wasting some of my precious time) but THANKS TO ALL OF YOUS...who |READLLY helped me out of it
Back to top
Invalid User



Joined: 14 Feb 2005
Posts: 442
Location: Texas, Usa

PostPosted: Tue Apr 26, 2005 5:55 am    Post subject: Reply with quote

1 as you, we also have lives.
2 most users here are not willing to write functioning scripts for others unless there is some benifit in it for them
3 as you, we also have lives.
4 would you like a media player I developed that can create play lists and play those file regardless of their location and path?

note: sorry if I offend
_________________
my lame sig Smile
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
garry



Joined: 19 Apr 2005
Posts: 1186
Location: switzerland

PostPosted: Tue Apr 26, 2005 6:39 am    Post subject: Reply with quote

have to study also.... the television program Very Happy
Code:

;CUTFILE.AHK  2005-04-26 garry
;C:\AAAA\BBBB\zzzz.txt      > write zzzz.txt
;--------------------------------------------
F1=ORIG.TXT
F2=NEW.TXT
;--------------------------------------------
i = 0
Loop
{
   i += 1
   FileReadLine, line, %F1%, %i%
   if ErrorLevel <> 0
      break

  stringlen, LenLine, line
  StringGetPos,C, line,\,R1
  If Errorlevel <> 0
    C = 0
  else
    C := LenLine-C

stringright,SR,line,C-1
fileappend,%SR%`r`n,%F2%
}
Back to top
View user's profile Send private message
corrupt



Joined: 29 Dec 2004
Posts: 2436

PostPosted: Tue Apr 26, 2005 6:50 am    Post subject: Reply with quote

corrupt wrote:
FileRead
Loop, Parse
SplitPath
Loop, FilePattern
FileCopy

OTOLIA wrote:
Mad Sad Confused Shocked Evil or Very Mad Question Exclamation thats FANTASTIC...what a community...it says "Lets help each other out" thats why i asked for u guys to make this script...
I thought that answer would have been helpful... It does say "help", not "scripts made for free while you wait"... Rolling Eyes

**UNTESTED**

Code:
ListFullPath = c:\myfilelist.txt
DestinationDirectory = c:\where_to_store_the_files
DrivesToSearch = c|d|e|f
; separate drive letters with |

ifNotExist, %ListFullPath%
{
MsgBox, The file: %ListFullPath%`r`ndoes not exist.
ExitApp
}
ifNotExist, %DestinationDirectory%
  FileCreateDir, %DestinationDirectory%
   
FileRead, thelist, %ListFullPath%
Loop, Parse, DrivesToSearch, |
{
  sdrive = %A_LoopField%
  Loop, Parse, thelist, `r`n
  {
    SplitPath, A_LoopField, filefromlist
    Loop, %sdrive%:\%filefromlist%, 1, 1
    {
      FileCopy, %A_LoopFileFullPath%, %DestinationDirectory%, 0
    }
  }
}
MsgBox, Done
Back to top
View user's profile Send private message Visit poster's website
guest
Guest





PostPosted: Mon May 02, 2005 7:43 am    Post subject: Reply with quote

OTOLIA wrote:
ok ... now i think no one understood my problem.. so i'll just cut the crap .. and write it simply:
I NEED A SCRIPT THAT WILL READ A TEXT FILE THAT CONTAINS SOME PATHS OF FILES, AND THEN IT WILL SEARCH THE FILE FROM MY ENTIRE SYSTEM (the script can cut the string of the name only from each line : c:\my docs\mp3\back.mp3 and then just search back.mp3" AND WHEN IT FINDS IT IT WILL COPY THAT FILE TO A SPECIFIC FOLDER. i think it can be done easily if the script first "indexed" my hard drive..... i think its clear now Rolling Eyes


Why don't you just keep your files in order on your hard drives, so you won't have to mess with hundreds of songs long playlists?
Why don't you just use a media player that will auto-index all of your hard drives?
Why don't you go and buy the cds instead of downloading music? (Usually, people who rip their own cds keep them in order on their hard drives...)

p.s. If you like screaming, go scream at your dog! Twisted Evil
Back to top
dijiyd



Joined: 31 Mar 2004
Posts: 90
Location: Philippines

PostPosted: Tue May 03, 2005 12:55 pm    Post subject: Reply with quote

It's done. He's not gonna come back, he already got what he wanted.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group