Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;- NAJEEB DRAG & DROP-TEXT-Files and see content and modified-time
- #NoEnv
- SendMode Input
- SetWorkingDir %A_ScriptDir%
- edcol1=white
- edcol2=yellow
- edcol3=red
- GUI,2:+AlwaysOnTop
- Gui,2: Color, ControlColor, Black
- Gui,2: Font, CDefault, FixedSys
- Gui,2:Add, Edit, x5 y10 w800 h45 c%edcol1% vF1,
- Gui,2:Add, Edit, x5 y60 w800 h800 c%edcol2% vUpc,
- GUI,2:show, NA W820 H600 X20 Y0, Drag & Drop Text-Files
- Gui,2: Font, s12 CDefault, Lucida Console
- ;Gui,2: Font, s16 CDefault, Times New Roman
- Gui,2:add, Text, vT1 x10 y870 w490 c%edcol3%,
- return
- ;----------------------------------------------------------
- 2GuiDropFiles:
- Loop, parse, A_GuiEvent, `n
- GuiControl,2:,F1,%A_LoopField%
- goto,showText2
- return
- 2GuiClose:
- ExitApp
- ;-----------------------------------------------
- ShowText2:
- Gui,2:submit,nohide
- F1=%f1%
- Extx := "txt,ahk,ahl,csv,bas,htm,html,ini,hta,bat,log,py,au3,ls,md,fm,mf"
- SplitPath,F1,name, dir, ext, name_no_ext, drive
- if ext in %extx%
- fileread, content, %F1%
- else
- {
- GuiControl,2:,upc,
- GuiControl,2:,T1,
- GuiControl,2:,upc,Not allowed`nExtension Not in %extx%
- FileGetTime, ft,%f1%,M
- GuiControl,2:,T1,MODIFIED=%ft%
- return
- }
- FileGetTime, ft,%f1%,M
- GuiControl,2:,T1,MODIFIED=%ft%
- GuiControl,2:,upc, %content%
- return
- ;========== END script ==================================
Add Comment
Please, Sign In to add comment