Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Finding All similar Files + flash in dialog + text color
#1
Ok im trying to make a macro which can find a certain file type on my computer...example ".txt" or ".ico"
i want the macro to search the whole computer for .txt files and place them in a folder on the desktop.
Can some one point me in the right direction and tell me if this is even possible?Note: im not wanting to find a certain file name its finding file types im looking for.I can only seem to find "find specific file name on QM"

Also.....can qm run flash files?or is it just strictly bmp & gif?Andf how do i change the colour of text in my dialogs....

Sorry about all the questions supose 1 post asking them all is better then multiple posts...saving you guys bandwith i guess :lol: less server usage.....think of the enviroment ! Smile

lol

Thanks Qm Forum!
VεRiTλS
#2
1. Use this dialog: floating toolbar -> files, web -> enumerate files. Type c:\*.txt and select Only in All.

2. In dialog Static picture controls can be used only bmp, gif and jpeg. In web browser controls also can be used flash. Example:

Function dlg_flash
Code:
Copy      Help
\Dialog_Editor

lpstr html=
;<HTML><HEAD>
;<SCRIPT src="res://mshtml.dll/objectembed_neutral.js"></SCRIPT>
;</HEAD>
;<BODY leftMargin=0 topMargin=0 scroll=no onload=ObjectLoad(); objectSource="file:///C:/Users/G/Desktop/digitalclock.swf"><EMBED src=file:///C:/Users/G/Desktop/digitalclock.swf width="100%" height="100%" type=application/x-shockwave-flash fullscreen="yes"></BODY></HTML>

str controls = "3"
str ax3SHD
ax3SHD=html
if(!ShowDialog("" 0 &controls)) ret


;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 ActiveX 0x54030000 0x0 0 0 224 114 "SHDocVw.WebBrowser"
;END DIALOG
;DIALOG EDITOR: "" 0x2030003 "" "" ""

It shows a swf file that is on the desktop. To get the HTML i opened the swf file in Internet Explorer and copied all the page source.

3. Text color. Search for __Font in the forum.
#3
Thanks for the quick reply Gintaras! ive allready noticed a few things i already knew! i guess sometimes the mind goes blank when you think about it to much.... :lol: though "__Font" is new to me as i was looking for "cfont" for some strange reason no doubt i read another post wrong :roll:

Quote:Use this dialog: floating toolbar -> files, web -> enumerate files. Type c:\*.txt and select Only in All.

Big Grin that made me smile i knew it wa hiding from me :lol:

Thanks Legend! :mrgreen:
VεRiTλS
#4
Flash files also can be played in flash player activex control. Don't know is it available on all computers. Or typelib version may different.

Function dlg_flash_ax
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

typelib ShockwaveFlashObjects {D27CDB6B-AE6D-11CF-96B8-444553540000} 1.0

if(!ShowDialog("dlg_flash_ax" &dlg_flash_ax)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 ActiveX 0x54030000 0x0 4 6 112 24 "ShockwaveFlashObjects.ShockwaveFlash {D27CDB6E-AE6D-11CF-96B8-444553540000}"
;END DIALOG
;DIALOG EDITOR: "" 0x2030003 "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,ShockwaveFlashObjects.ShockwaveFlash sh3
,sh3._getcontrol(id(3 hDlg))
,sh3.LoadMovie(0 _s.expandpath("$desktop$\digitalclock.swf"))
,sh3.Play
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#5
cool ive just looked at the activex controls,didnt know about them...thanks for the info Big Grin

Quote:Use this dialog: floating toolbar -> files, web -> enumerate files. Type c:\*.txt and select Only in All.

How do i copy all the files i found into a directory on the desktop?
i can copy and move certain files into a directory on the desktop but how do i grab the ones i found?
basicly i want to find all images on my computer without using the search through start menu.
im making a toolbar style menu so i can access programs and files more quickly ive finished the toolbar and all the functions this is the last function i need.
seems Qm is 10x faster at finding them and takes less CPU.

Thanks Gintaras
VεRiTλS
#6
on the question of copy:

Macro
Code:
Copy      Help
str NewFolder="$desktop$\New Text Folder" ;; Define destination folder
if(!dir(NewFolder 1)) ;;test to see if destination folder exists
,mkdir NewFolder ;;creates folder if non-existant
Dir d
foreach(d "C:\*.txt" FE_Dir 0x4) ;;put in whatever directory you want to search
,str sPath=d.FileName(1) ;;gets current path of files
,_s=d.FileName(0) ;;gets just the filename and extention
,_s.format("%s\%s" NewFolder _s) ;;appends destination folder created above to _s
,cop+ sPath _s ;;copies from current path to destination folder. "+" appends "Copy of" to duplicates

Gintaras,
Could you give an example of turning this into one of those glorious universal functions you alway provide...
Something like this...I know this is sloppy and doesn't work, but posted it to show you what I'm talking about. I'd like to see how you would do it?
Maybe throw in some flags and optional stuff...I want to get a better grasp at working on these so I can start saving some code time...You seem to have it mastered, so I would like to get a glimpse into how you think about it.

Function MoveFileType
Code:
Copy      Help
function Directory Destination filetype

;EXAMPLE---------------------------
;MoveFileType "C:\" "$desktop$\New Text Folder" "txt"
;

str search.format("%s*%s" Directory filetype)
if(!dir(Destination 1))
,mkdir Destination
Dir d
foreach(d search FE_Dir 0x4)
,str sPath=d.FileName(1)
,_s=d.FileName(0)
,_s.format("%s\%s" Destination _s)
,cop+ sPath _s
Thanks,
Jimmy Vig


Forum Jump:


Users browsing this thread: 1 Guest(s)