 |
AutoHotkey Community Wir helfen uns gegenseitig aus der Patsche
|
| Vorheriges Thema anzeigen :: Nächstes Thema anzeigen |
| Autor |
Nachricht |
garry
Anmeldedatum: 25.10.2005 Beiträge: 396 Wohnort: switzerland
|
Verfasst am: Fr Sep 01, 2006 9:31 pm Titel: NewsReader |
|
|
MODIFIED=2008-08-13
script in einem Ordner abspeichern
===================================
Nachrichten Basel/Schweiz/Welt
Start, Nachrichten Schlagzeilen sichtbar
Durch Anklicken Nachricht lesen
Ersten Gui minimieren, zweiten Gui sieht man unten als schmalen Streifen
Die letzten 3 Nachrichten sind sichtbar
Durch Anklicken (Links/Mitte/Rechts) kann man die Nachricht lesen
Diese Nachricht kann gesendet werden , Button EMAL1/2 (mit vmailer.exe)
Kann nach Stichwörtern suchen, die Nachrichten erscheinen zuoberst
Beispiel: swiss,tele,umts
Nachteil:
Wenn Computer standby/sleep evtl neu starten
| Code: | MODIFIED=20080813
DEFAULT1=http://verlag.baz.ch/newsticker/index.cfm
TheseToolsToDownload = http://virdi-software.com/vmailer/desc.shtml
/*
DATE....................... 2006-02-12 garry
NAME....................... NEWS.AHK
ADD-PROG................... vmailer.exe http://virdi-software.com to send readed news
........................... http://virdi-software.com/vmailer/desc.shtml
USAGE...................... read news from swiss basler zeitung
........................... see a small bar with the last three headlines
........................... click on headline , read the news
........................... send news to a friend
NOTES...................... http://de.wikipedia.org/wiki/UTF-8
UTF-8 sean................. http://www.autohotkey.com/forum/topic17343.html
........................... http://verlag.baz.ch/newsticker/index.cfm
*/
/*
http://verlag.baz.ch/news/index.cfm?keyID=17CD2E0A-DF54-4CBB-95FF9E386784539B ;schweiz
http://verlag.baz.ch/news/index.cfm?keyID=D9D08A04-1208-4059-9E63E3737491F484 ;international
http://verlag.baz.ch/news/index.cfm?keyID=02FAED07-AC4E-423C-90C2AC226F4B680D ;wirtschaft
http://verlag.baz.ch/news/index.cfm?keyID=6BF9B4A6-7C45-4B8B-AAC0F6F27F40F7A6 ;_vermischtes
http://verlag.baz.ch/news/index.cfm?keyID=D0987B04-9C09-4776-846770EF3819D044 ;kultur
http://verlag.baz.ch/news/index.cfm?keyID=F3E7B466-F984-4A02-9B549BA9F5718B45 ;sport
http://verlag.baz.ch/news/index.cfm?keyID=C1723B82-3730-4DA5-88B7DAEFC3372DD6 ;region
http://verlag.baz.ch/newsticker/index.cfm ;newsticker
http://verlag.baz.ch/wetter/index.cfm ;wetter
http://www.baz.ch/rss/topnews.cfm
http://www.baz.ch/rss/region.cfm
http://www.baz.ch/rss/international.cfm
http://www.baz.ch/rss/wirtschaft.cfm
http://www.baz.ch/rss/schweiz.cfm
http://www.baz.ch/rss/kultur.cfm
http://www.baz.ch/rss/sport.cfm
*/
#NoEnv
;#NoTrayIcon
setworkingdir, %a_scriptdir%
SetBatchLines -1
Gui,1:+Resize
VMAILER=vmailer.exe
ifnotexist,%A_scriptdir%\%VMAILER%
gosub,DOWNLOAD1
transform,y1,chr,194 ;C2
transform,x1,chr,195 ;C3
transform,e1,chr,169 ;A9
transform,a1,chr,164 ;A4
transform,a2,chr,132 ;84
transform,a3,chr,163 ;A3
transform,o1,chr,182 ;B6
transform,o2,chr,150 ;96
transform,u1,chr,188 ;BC
transform,u2,chr,156 ;9C
F2 =%A_scriptdir%\NEWS_ALL.txt
F4 =%A_scriptdir%\NEWS_URL.txt
F4sorted=%A_scriptdir%\F4sorted.txt
BS =%A_scriptdir%\_NEWSSEARCH.INI
BT =%A_scriptdir%\_NEWSTIMER.INI
ifnotexist,%BS%
fileappend,swiss`,tele`,umts`,com`r`n,%BS% ;search word
ifnotexist,%BT%
fileappend,10`r`n,%BT% ;refresh time=10 minutes
WA=%A_screenwidth%
HA=%A_screenheight%
SW :=(WA*97)/100
SH :=(HA*95)/100
menu,S1,Add,&Set Refresh-Time,MH1
menu,S1,Add,&How to use,MH2
menu,S2,Add,&About,MH3
menu,myMenuBar,Add,Settings,:S1
menu,myMenuBar,Add,About ,:S2
gui,1:menu,MyMenuBar
;------------------ window below -----------------------
Gui,4:+AlwaysOnTop +ToolWindow
;Gui,4:-border
Gui,4: Font,S10 CDefault,Lucida Console
SWS4:=(WA*98.5)/100 ;width Show
TAB4:=((SWS4/3)-4) ;TAB
T1 :=(TAB4)
T2 :=(TAB4+TAB4)
T3 :=(TAB4+TAB4+TAB4)
SYS4:=(HA-52) ;y Show
LSW4:=(SWS4-20) ;width ListView
ROW4:=1
Gui,4:Add, ListView, grid x0 y0 r%ROW4% w%LSW4% +hscroll -hdr nosorthdr altsubmit vAA1 gBB1, A|A2|B|B2|C|C2
;--------------------------------------------------------
Gui,1: Color, 000000
LSW:=700 ;ListView width
GSW:=LSW+30 ;GuiShow width
ROW:=48
Gui,1:Font,S10 cDefault, Verdana
Gui,1:Add, ListView, backgroundTeal cWhite grid y130 r%ROW% w%LSW% +hscroll -hdr nosorthdr altsubmit vMyListView1 gMyListView1 Checked, News|URL|TIME
LV_ModifyCol(1,500)
LV_ModifyCol(2,0)
LV_ModifyCol(3,160)
Gui,1:Add,Button, x530 y5 w80 h20,Refresh
Gui,1:Add,Button, x530 y42 w80 h20,Reload
Gui,1:Add,Button, x530 y70 w80 h20,PRINT
Gui,1:Add,Button, x15 y42 w70 h20 gUK,UK
Gui,1:Add,Button, x95 y42 w70 h20 gNL,NL
Gui,1:Add,Button, x175 y42 w70 h20 gCH,CH
Gui,1:Add,Button, x255 y42 w70 h20 gTV,TV
Gui,1:Add,Button, x335 y42 w70 h20 gSBB,BAHN
Gui,1:Add,Button, x415 y42 w70 h20 gHEISE,HEISE
Gui,1:Add,Button, x15 y98 w70 h20 gEMAIL1,EMAIL1
Gui,1:Add,Button, x175 y70 w70 h20 gTEST3,BAZ
Gui,1:Add,Button, x255 y70 w70 h20 gTEST4,D-PHON
Gui,1:Add,Button, x335 y70 w70 h20 gTEST5,CH-MAP
Gui,1:Add,Button, x415 y70 w70 h20 gTEST6,CH-PHON
Gui,1: Add, Edit, x15 y5 w450 h20 vLAC
Gui,1: Font, S8 cwhite, Verdana
Gui,1: Add, Text, x17 y26 w450 h12 vDED1,
Gui,1: Add, Text, x530 y26 w30 h12 vDED2,%TIME1A%
Gui,1: Add, Text, x560 y26 w45 h12 ,Minuten
Gui,1: Add, Button,x0 y0 w0 h0 default gLAC,
GuiControl,1:,DED1 ,%LAC2%
GuiControl,1:,DED2 ,%TIME1A%
GuiControl,1:Focus,LAC
SplashTextOn,400,60,, START DOWNLOAD >>>>
Gosub,StartTimer
Gui,1: Show, x2 y0, NEWS %MODIFIED%
return
;--------------------------------------------------------------
LAC:
gui,1:submit,nohide
filedelete,%BS%
fileappend,%LAC%,%BS%
;-----------------------------
FILLLIST:
gui,1:submit,nohide
FileReadLine,LAC2,%BS%,1
FileReadLine,TIME1A,%BT%,1
LV_Delete()
loop,read,%F4sorted%
{
BX1=
BX2=
BX3=
stringsplit,BX,A_LoopReadLine,`;,
stringmid,BX1a,BX1,13,100
QAS=%LAC2%
if BX1 contains %QAS%
LV_Insert(1,"Check",BX1a,BX2,BX3)
else
LV_Add("",BX1a,BX2,BX3)
}
GuiControl,1:,DED1 ,%LAC2%
GuiControl,1:,DED2 ,%TIME1A%
;LV_ModifyCol(3,"integer")
;LV_ModifyCol(3, "Sort") ;sort column2
LV_ModifyCol(3, "Logical SortDesc")
;activeWin := WinActive("A")
;Gui,4:+AlwaysOnTop +ToolWindow
;Gui,4:+ToolWindow
;Gui,4:Show, x3 y%SYS4% w%SWS4% h18,NEWS-2
;WinActivate ahk_id %activeWin%
;SoundBeep,400,150
return
;=============================================================================
ButtonPrint:
run,notepad %F7a%
return
ButtonReload:
reload
return
UK:
;run,http://www.bbc.co.uk/radio
run,http://news.bbc.co.uk/2/hi/europe/default.stm
return
CH:
run,http://www.blick.ch/news
return
NL:
ifexist,%A_ProgramFiles%\Teletekstbrowser\Teletekst.exe
run,%A_ProgramFiles%\Teletekstbrowser\Teletekst.exe
else
run,http://teletekst.nos.nl/gif/101-01.html?navi=101&submit=gaan
return
TV:
run,http://www.20min.ch/unterhaltung/tv_guide/
return
SBB:
;run,http://fahrplan.sbb.ch/bin/query.exe/dn
run,http://reiseauskunft.bahn.de/bin/query.exe/d
return
HEISE:
run,http://www.heise.de/newsticker/
return
TEST3:
run,%DEFAULT1%
return
TEST4:
run,http://www.telefonbuch.de/NSAPI/Anfrage
return
TEST5:
run,http://www.20min.ch/tools/karte/
return
TEST6:
run,http://www.20min.ch/tools/telefonbuch/
return
;------------- <<<< here email adress >>> ---------------------------------------------
EMAIL1:
F7ac=result2.txt
ifexist,%F7ac%
Filedelete,%F7ac%
; for test TO=your own adress
TO =garry1999@bluewin.ch
FROM=garry1999@bluewin.ch
SMTP=mail.bluewin.ch
CX1=Hello Garry
FileRead,F7ab,%F7a%
if F7ab=
{
msgbox,%F7ab% is empty
return
}
;------------- BLOCK INPUT ------------------
Gui,9:Add, Edit, x15 y5 w770 h180 vUSERINPUT
Gui,9:Add, Button,x10 y200 w100 h25 gCONT1,OK
GuiControl,9:Focus,USERINPUT
Gui,9:Show,x10 y50 h230 w870,INPUT NOTICE
return
CONT1:
gui,9:submit,nohide
LINJ=--------------------------------------------------------------------
gui,9:destroy
msgbox,SEND to %TO%`r`n%C3%`r`n %F7ab%
MsgBox, 4, ,Want you SEND this to %TO% ?
IfMsgBox,No
return
Else
{
Fileappend,From:%FROM%`r`nSubject:%LN2%`r`n`r`n%CX1%`,`r`n`r`n%userinput%`r`n%LINJ%`r`nBasler Zeitung %C3%`r`n%DEFAULT1%`r`n%F7ab%,%F7ac%
;runwait,%VMAILER% %F7ac% %SMTP% %TO% %FROM%
run,%comspec% /k %VMAILER% %F7ac% %SMTP% %TO% %FROM%
return
}
return
;===========================================================================
;=============================================================================
MH3:
msgbox,_NEWS.ahk 2006-02-12-- garry`r`nhttp://www.autohotkey.com
return
MH2:
msgbox,this program start %DEFAULT1%`r`nCan set timer for refresh`r`nCan search for a word `r`n
return
MH1:
Gui,2:Add, Edit, x15 y5 w70 h20 vTIME1A
Gui,2:Add, Button,x0 y0 w0 h0 default gTIMER,
GuiControl,2:Focus,TIME1A
Gui,2:Show,x10 y50 h70 w170,INPUT TIMER
return
;=============================================================================
TIMER:
gui,2:submit,nohide
GuiControl,2:,DED2 ,%TIME1A%
filedelete,%BT%
fileappend,%TIME1A%,%BT%
2GuiClose:
2GuiEscape:
Gui,2:destroy
Gosub,StartTimer
Gosub,FILLLIST
return
;=============================================================================
MyListView1:
gui,1:submit,nohide
GuiControlGet, MyListView1
if A_GuiEvent = Normal
{
MouseGetPos,x,y
;----------
if x<50
{
return
}
if x<500 AND x>50
{
LV_GetText(C1,A_EventInfo,1)
LV_GetText(C2,A_EventInfo,2)
LV_GetText(C3,A_EventInfo,3)
Goto,second
}
}
return
STARTTIMER:
gui,1:submit,nohide
FileReadLine,TIME1,%BT%,1
TIME2:=(60000*TIME1)
gosub,AAS
settimer,AAS,%TIME2%
return
;-----------------------------------------------
buttonRefresh:
SplashTextOn,400,60,, START DOWNLOAD >>>>
AAS:
Gui,1:submit,nohide
gosub,crearss ;>>>
Formattime,TS,,longdate
Formattime,TT,T12,time
Filereadline,line,%F4sorted%,1
stringsplit,CX,Line,`;,
stringmid,AAD,CX1,1,20
AAD=%AAD%
stringmid,CX1,CX1,13,80 ;cut date
SWS :=(WA*99)/100 ;width splashimage
SYS :=(HA-85) ;splashimage y position
if AC4=%AAD%
return ;SAME nothing changed
;----------------------------------------
AC4=%AAD%
Filereadline,line,%F4sorted%,2
stringsplit,CJ,Line,`;,
stringmid,CJ1,CJ1,13,80 ;cut date
Filereadline,line,%F4sorted%,3
stringsplit,CI,Line,`;,
stringmid,CI1,CI1,13,80 ;cut date
activeWin := WinActive("A")
Gui,4:DEFAULT
Gui,4:Listview,AA1
;Gui,4:+AlwaysOnTop
Gui,4:+AlwaysOnTop +ToolWindow
;Gui,4:+ToolWindow
Gui,4:Show, x3 y%SYS4% w%SWS4% h18,NEWS-2
WinActivate ahk_id %activeWin%
;SoundBeep,400,150
LV_ModifyCol(1,TAB4)
LV_ModifyCol(2,0)
LV_ModifyCol(3,TAB4)
LV_ModifyCol(4,0)
LV_ModifyCol(5,TAB4)
LV_ModifyCol(6,0)
LV_DELETE()
LV_Add("",CX1,CX2,CJ1,CJ2,CI1,CI2)
Gui,1:DEFAULT
gosub,filllist
return
;###################################################################
BB1:
GuiControlGet, BB1
Gui,4:Submit,nohide
Gui,4:Listview,AA1
if A_GuiEvent = Normal
{
MouseGetPos,x,y
;----------
if x<%T1%
{
LV_GetText(C2,A_EventInfo,2)
goto,second
return
}
if x<%T2%
{
LV_GetText(C4,A_EventInfo,4)
C2=%C4%
Goto,second
return
}
if x>%T2%
{
LV_GetText(C6,A_EventInfo,6)
C2=%C6%
Goto,second
return
}
return
}
return
;#####################################################################################
CREARSS:
Gui,1:submit,nohide
; SplashTextOn,400,60,, START DOWNLOAD >>>>
F2 =%A_scriptdir%\NEWS_ALL.txt
F4 =%A_scriptdir%\NEWS_URL.txt
F4sorted =%A_scriptdir%\F4sorted.txt
BS =%A_scriptdir%\_NEWSSEARCH.INI
BT =%A_scriptdir%\_NEWSTIMER.INI
FileDelete,%F2%
FileDelete,%F4%
FileDelete,%F4sorted%
F31=%A_scriptdir%\baz31_REGION.txt
F32=%A_scriptdir%\baz32_INTERNATIONAL.txt
F33=%A_scriptdir%\baz33_WIRTSCHAFT.txt
F34=%A_scriptdir%\baz34_SCHWEIZ.txt
F35=%A_scriptdir%\baz35_KULTUR.txt
F36=%A_scriptdir%\baz36_SPORT.txt
F37=%A_scriptdir%\baz37_TOP.txt
F39=%A_scriptdir%\baz39_DIVERS.txt
ifexist,%F31%
Filedelete,%F31%
ifexist,%F32%
Filedelete,%F32%
ifexist,%F33%
Filedelete,%F33%
ifexist,%F34%
Filedelete,%F34%
ifexist,%F35%
Filedelete,%F35%
ifexist,%F36%
Filedelete,%F36%
ifexist,%F37%
Filedelete,%F37%
ifexist,%F39%
Filedelete,%F39%
F21=http://www.baz.ch/rss/region.cfm
F22=http://www.baz.ch/rss/international.cfm
F23=http://www.baz.ch/rss/wirtschaft.cfm
F24=http://www.baz.ch/rss/schweiz.cfm
F25=http://www.baz.ch/rss/kultur.cfm
F26=http://www.baz.ch/rss/sport.cfm
F27=http://www.baz.ch/rss/topnews.cfm
F29=http://verlag.baz.ch/news/index.cfm?keyID=6BF9B4A6-7C45-4B8B-AAC0F6F27F40F7A6
;urldownloadtofile,%F21%,%F31%
urldownloadtofile,%F22%,%F32%
urldownloadtofile,%F23%,%F33%
urldownloadtofile,%F24%,%F34%
;urldownloadtofile,%F25%,%F35%
;urldownloadtofile,%F26%,%F36%
urldownloadtofile,%F27%,%F37%
;urldownloadtofile,%F29%,%F39%
;AASD="%F31%"+"%F32%"+"%F33%"+"%F34%"+"%F35%"+"%F36%"+"%F37%"+"%F39%" "%F2%"
AASD="%F32%"+"%F33%"+"%F34%"+"%F37%" "%F2%"
run,%comspec% /c copy %AASD%,,hide
SplashTextOff
sleep,1500
transform,ten,chr,10
transform,tre,chr,13
CF=%TRE%%TEN%
F2a=CONVERTED.txt
Filedelete,%F2a%
FileRead,AA,%F2%
stringreplace,A,AA,`n,%CF%,all
fileappend,%A%`r`n,%F2a%
F2=%F2a%
transform,y1,chr,194 ;C2
transform,x1,chr,195 ;C3
transform,a1,chr,164 ;A4
transform,o1,chr,182 ;B6
transform,u1,chr,188 ;BC
transform,u2,chr,156 ;9C
Loop,Read,%F2%
{
LRL=%A_LoopReadLine%
StringReplace,LRL,LRL,¢,à,All
StringReplace,LRL,LRL,³,ó,All
StringReplace,LRL,LRL,§,ç,All
StringReplace,LRL,LRL,¨,è,All
StringReplace,LRL,LRL,®,î,All
StringReplace,LRL,LRL,´,ô,All
StringReplace,LRL,LRL,ª,ê,All
;StringReplace,LRL,LRL,»,û,All
stringreplace,LRL,LRL,%y1%,,all
stringreplace,LRL,LRL,%x1%,,all
stringreplace,LRL,LRL,%e1%,e,all
stringreplace,LRL,LRL,%a1%,ae,all
stringreplace,LRL,LRL,%a2%,Ae,all
stringreplace,LRL,LRL,%a3%,a,all
stringreplace,LRL,LRL,%o1%,oe,all
stringreplace,LRL,LRL,%o2%,Oe,all
stringreplace,LRL,LRL,%u1%,ue,all
stringreplace,LRL,LRL,%u2%,Ue,all
;---------------------
IfInString,LRL,<item>
{
ITEM=1
continue
}
IfInString,LRL,</item>
{
ITEM=0
continue
}
;---------------------
;---------------------
if item=1
{
IfInString,LRL,<title>
{
H3=
Loop, Parse,LRL ,><,`
H%A_Index% := A_LoopField
TITLE=%H3%
}
IfInString,LRL,<link>
{
H3=
Loop, Parse,LRL ,><,`
H%A_Index% := A_LoopField
URL=%H3%
Stringreplace,URL,URL,http://www.baz.ch/news/rss.cfm?,http://verlag.baz.ch/newsticker/news.cfm?,all
}
;<dc:date>2008-08-09T11:24:00Z</dc:date>
IfInString,LRL,<dc:date>
{
H3=
Loop, Parse,LRL ,><,`
H%A_Index% := A_LoopField
DATE1=%H3%
stringreplace,DATE1,DATE1,T,%A_space%,all
stringmid,DATE1,DATE1,1,16
DATE2=%DATE1%
stringreplace,DATE2,DATE2,-,%nothing%,all
stringreplace,DATE2,DATE2,:,%nothing%,all
stringreplace,DATE2,DATE2,%A_space%,%nothing%,all
FILEAPPEND,%DATE2%%TITLE%;%URL%;%DATE1%`r`n,%F4%
}
}
;------------- end item1 xml -----------------------------
;----------------- try to find -vermischtes ----------------
;---------- first lines header
IfInstring,LRL,<div class="surveyBody">
{
Loop, Parse,LRL ,<>,`
H%A_Index% := A_LoopField
URL21 = %H10%
TITLE21= %H11%
if URL21 not contains /news/index.cfm?keyID=6BF9B4A6-7C45-4B8B-AAC0F6F27F40F7A6
continue
stringreplace,URL21,URL21,`",%nothing%,all
stringreplace,URL21,URL21,a href=,http://verlag.baz.ch,all
stringreplace,URL21,URL21,amp`;,%nothing%,all
DATE11=
DATE12=199912312359
FILEAPPEND,%DATE12%%TITLE21%;%URL21%;%DATE11%`r`n,%F4%
}
IfInString,LRL,<a href="/news/index.cfm?keyID=6BF9B4A6-7C45-4B8B-AAC0F6F27F40F7A6&startpage=1
{
H2=
H3=
Loop, Parse,LRL ,<>,`
H%A_Index% := A_LoopField
URL11 =%H2%
TITLE11=%H3%
if URL11 not contains /news/index.cfm?keyID=6BF9B4A6-7C45-4B8B-AAC0F6F27F40F7A6
continue
stringreplace,URL11,URL11,`",%nothing%,all
stringreplace,URL11,URL11,a href=,http://verlag.baz.ch,all
stringreplace,URL11,URL11,amp`;,%nothing%,all
DATE11=
DATE12=199912312359
FILEAPPEND,%DATE12%%TITLE11%;%URL11%;%DATE11%`r`n,%F4%
}
}
F4sorted=%A_scriptdir%\F4sorted.txt
ifexist,%F4sorted%
filedelete,%F4sorted%
FileRead,AAAA,%F4%
Sort,AAAA, U ;remove duplicate
Sort,AAAA, R ;reverse mode
FileAppend, %AAAA%,%F4sorted%
return
;================================================================================================
;##############################################
SECOND:
gui,1:submit,nohide
F5a=%C2%
F6a=NEWS_DETAIL.txt
F7a=NEWS_RESULT.TXT
Filedelete,%F6a%
Filedelete,%F7a%
urldownloadtofile,%F5a%,%F6a%
sleep,500
Fileappend,`r`n,%F7a%
CL=0
;begin <h1 class="title">
;after last line <hr><a href=
FIR=0
IIS=0
Loop,Read,%F6a%
{
LRL=%A_LoopReadLine%
LRL=%LRL%
if LRL contains ANZEIGE
continue
if LRL contains Finden Sie den Artikel lesenswert
continue
if LRL contains baz_write
continue
stringreplace,LRL,LRL,%y1%,,all
stringreplace,LRL,LRL,%x1%,,all
stringreplace,LRL,LRL,%e1%,e,all
stringreplace,LRL,LRL,%a1%,ae,all
stringreplace,LRL,LRL,%a2%,Ae,all
stringreplace,LRL,LRL,%a3%,a,all
stringreplace,LRL,LRL,%o1%,oe,all
stringreplace,LRL,LRL,%o2%,Oe,all
stringreplace,LRL,LRL,%u1%,ue,all
stringreplace,LRL,LRL,%u2%,Ue,all
StringReplace,LRL,LRL,¢,à,All
StringReplace,LRL,LRL,³,ó,All
StringReplace,LRL,LRL,§,ç,All
StringReplace,LRL,LRL,¨,è,All
StringReplace,LRL,LRL,®,î,All
StringReplace,LRL,LRL,´,ô,All
StringReplace,LRL,LRL,ª,ê,All
;StringReplace,LRL,LRL,»,û,All
StringReplace,LRL,LRL, ,%A_SPACE%,All
StringReplace,LRL,LRL,&,%A_SPACE%,All
StringReplace,LRL,LRL,>,%A_SPACE%,All
StringReplace,LRL,LRL,<,%A_SPACE%,All
;StringReplace,LRL,LRL,Ä`;,Ä,All
StringReplace,LRL,LRL,ä`;,ä,All
StringReplace,LRL,LRL,ë`;,ë,All
;StringReplace,LRL,LRL,Ö`;,Ö,All
StringReplace,LRL,LRL,ö`;,ö,All
;StringReplace,LRL,LRL,Ü`;,Ü,All
StringReplace,LRL,LRL,ü`;,ü,All
StringReplace,LRL,LRL,«`;,",All
StringReplace,LRL,LRL,»`;,",All
StringReplace,LRL,LRL,&bdquo`;,",All
StringReplace,LRL,LRL,&ldquo`;,",All
StringReplace,LRL,LRL,è`;,è,All
StringReplace,LRL,LRL,é`;,é,All
StringReplace,LRL,LRL,"`;,",All
StringReplace,LRL,LRL,â`;,â,All
StringReplace,LRL,LRL,á`;,á,All
StringReplace,LRL,LRL,ó`;,ó,All
StringReplace,LRL,LRL,&rsquo`;,`',All
StringReplace,LRL,LRL,ç`;,ç,All
StringReplace,LRL,LRL,&ndash`;,-,All
StringReplace,LRL,LRL,ô`;,ô,All
StringReplace,LRL,LRL,í`;,i,All
StringReplace,LRL,LRL,°`;,%NOTHING%,All
IfInString,LRL,<h1 class="title"> ;first line
{
IIS=1
Loop Parse,LRL,<>
{
If (A_Index & 1)
{
if A_LoopField=
continue
if FIR=0
LN2=%A_LoopField% ;title subject email
FIR=1
Fileappend,%A_LoopField%`r`n,%F7a%
}
}
continue
}
if IIS=1
{
;IfInString,LRL,<hr><a href=
IfInString,LRL,Copyright
break
Loop Parse,LRL,<>
{
If (A_Index & 1)
{
if A_LoopField=
continue
Fileappend,%A_LoopField%`r`n,%F7a%
}
}
}
}
AA2:
AA=
FileRead,AA,%F7a%
Splashimage,,FS12 M2 x20 y80 w%SW% CWsilver zh0,%AA%
return
;================= DOWNLOAD VMAILER.exe ===================
DOWNLOAD1:
{
text31=
(
This ahk-script needs VMAILER.exe to send readed news to a friend
Download
from
%TheseToolsToDownload%
Want you download this program ?
)
msgbox, 262180, Start URL,%text31%
ifmsgbox,NO
return
else
{
run,%TheseToolsToDownload%
exitapp
}
}
return
;============================================================================
GuiClose:
gui,4:destroy
ExitApp
;====================== NOTICE =========================
/*
CP_ACP = 0
CP_OEMCP = 1
CP_MACCP = 2
CP_UTF7 = 65000
CP_UTF8 = 65001
*/
/*
Ansi2Oem(sString)
{
Ansi2Unicode(sString, wString, 0)
Unicode2Ansi(wString, zString, 1)
Return zString
}
Oem2Ansi(zString)
{
Ansi2Unicode(zString, wString, 1)
Unicode2Ansi(wString, sString, 0)
Return sString
}
Ansi2UTF8(sString)
{
Ansi2Unicode(sString, wString, 0)
Unicode2Ansi(wString, zString, 65001)
Return zString
}
UTF82Ansi(zString)
{
Ansi2Unicode(zString, wString, 65001)
Unicode2Ansi(wString, sString, 0)
Return sString
}
Ansi2Unicode(ByRef sString, ByRef wString, CP = 0)
{
nSize := DllCall("MultiByteToWideChar"
, "Uint", CP
, "Uint", 0
, "Uint", &sString
, "int", -1
, "Uint", 0
, "int", 0)
VarSetCapacity(wString, nSize * 2)
DllCall("MultiByteToWideChar"
, "Uint", CP
, "Uint", 0
, "Uint", &sString
, "int", -1
, "Uint", &wString
, "int", nSize)
}
Unicode2Ansi(ByRef wString, ByRef sString, CP = 0)
{
nSize := DllCall("WideCharToMultiByte"
, "Uint", CP
, "Uint", 0
, "Uint", &wString
, "int", -1
, "Uint", 0
, "int", 0
, "Uint", 0
, "Uint", 0)
VarSetCapacity(sString, nSize)
DllCall("WideCharToMultiByte"
, "Uint", CP
, "Uint", 0
, "Uint", &wString
, "int", -1
, "str", sString
, "int", nSize
, "Uint", 0
, "Uint", 0)
}
*/
|
Zuletzt bearbeitet von garry am Mi Aug 13, 2008 10:29 am, insgesamt 8-mal bearbeitet |
|
| Nach oben |
|
 |
Chucky
Anmeldedatum: 07.01.2006 Beiträge: 618 Wohnort: Powerland
|
Verfasst am: Fr Sep 01, 2006 10:24 pm Titel: |
|
|
Spitze!!  |
|
| Nach oben |
|
 |
automaticman
Anmeldedatum: 16.01.2007 Beiträge: 10
|
Verfasst am: Di Jan 16, 2007 6:51 am Titel: |
|
|
| Alles läuft, bis auf die Tatsache, dass die News nicht erscheinen, das Fenster bleibt (bei mir zumindest) leer. |
|
| Nach oben |
|
 |
garry
Anmeldedatum: 25.10.2005 Beiträge: 396 Wohnort: switzerland
|
Verfasst am: Di Jan 16, 2007 10:53 am Titel: |
|
|
hallo automaticman,
irgendwo scheint ein Zeichen verloren zu gehen wenn man 'Kopieren' drückt
wenn ich von Hand kopiere (ctrl+c) funktioniert es
kleine Aenderung:
das zweite untere kleine Gui schliessen wenn gelesen, neue Nachricht erscheint falls news geaendert nach 5 Minuten (siehe settings Set Refresh-Time ,im script als 5 Minuten eingestellt) |
|
| Nach oben |
|
 |
automaticman
Anmeldedatum: 16.01.2007 Beiträge: 10
|
Verfasst am: Di Jan 16, 2007 12:40 pm Titel: |
|
|
| Hilft bei mir immer noch nicht, es könnte evtl. auch sein, dass sich unterschiedliche .ahk Skripte in die Quere kommen?! |
|
| Nach oben |
|
 |
garry
Anmeldedatum: 25.10.2005 Beiträge: 396 Wohnort: switzerland
|
Verfasst am: Di Jan 16, 2007 1:29 pm Titel: |
|
|
sollte eigentlich nicht
müsste mit filecompare untersuchen was anders ist beim kopieren
vielleicht stören im script die html Zeichen
Bsp: IfInString,LRL,<td style="padding: |
|
| Nach oben |
|
 |
Chucky
Anmeldedatum: 07.01.2006 Beiträge: 618 Wohnort: Powerland
|
Verfasst am: Di Jan 16, 2007 9:06 pm Titel: |
|
|
| garry hat Folgendes geschrieben: | vielleicht stören im script die html Zeichen
Bsp: IfInString,LRL,<td style="padding: | Genau, z. B. aus | Code: | | StringReplace,LRL,LRL,ü,ue,All | wird | Code: | | StringReplace,LRL,LRL,?ll | ; das geht mit vielen StringReplace-Zeilen so. Das Kopieren-Feature scheint für einige Sonderzeichen/Umlaute nicht zu funktionieren.
Aber bei mir funktioniert das Script auch mit der "verstümmelten" Datei.
Der Fehler bei automaticmans Script muß eine andere Ursache haben.
Womöglich eine Firewall?
__________________________________________
Created with BBCodeWriter 6.6 - the one and only  |
|
| Nach oben |
|
 |
garry
Anmeldedatum: 25.10.2005 Beiträge: 396 Wohnort: switzerland
|
Verfasst am: Di Jan 16, 2007 10:08 pm Titel: |
|
|
danke Chucky,
diese Zeilen habe ich deaktiviert , script hat denn normal funktioniert
aber kopieren mit ctrl+c/ctrl+v ins notepad war es auch gut
habe fc.exe von Windows ausprobiert
| Code: | Filedelete,test55.txt
MF=%A_ScriptDir%
Loop,%MF%,1
SP = %A_LoopFileShortPath%
run,%comspec% /k fc %SP%\_FORUMNEWS.ahk %SP%\_news.ahk >>test55.txt
exitapp
| dabei auch das gleiche festgestellt (Auszug)
| Zitat: | ***** C:\DOKUME~1\garry~1\DESKTOP\TESTAHK\_1AA_T~1\NEWS\_FORUMNEWS.ahk
;StringReplace,LRL,LRL,Ä`;,?All
StringReplace,LRL,LRL,ä`;,?ll
StringReplace,LRL,LRL,ë`;,?ll
;StringReplace,LRL,LRL,Ö`;,?All
StringReplace,LRL,LRL,ö`;,?l
;StringReplace,LRL,LRL,Ü`;,?All
StringReplace,LRL,LRL,ü`;,?
StringReplace,LRL,LRL,«`;,",All
***** C:\DOKUME~1\garry~1\DESKTOP\TESTAHK\_1AA_T~1\NEWS\_NEWS.AHK
;StringReplace,LRL,LRL,Ä`;,Ä,All
StringReplace,LRL,LRL,ä`;,ä,All
StringReplace,LRL,LRL,ë`;,ë,All
;StringReplace,LRL,LRL,Ö`;,Ö,All
StringReplace,LRL,LRL,ö`;,ö,All
;StringReplace,LRL,LRL,Ü`;,Ü,All
StringReplace,LRL,LRL,ü`;,ü,All
StringReplace,LRL,LRL,«`;,",All
*****
|
|
|
| Nach oben |
|
 |
automaticman
Anmeldedatum: 16.01.2007 Beiträge: 10
|
Verfasst am: Mi Jan 17, 2007 11:03 am Titel: |
|
|
Hab's gerade auch mit dem Ausschalten des Firewalls probiert, hilft leider auch nicht in meinem Fall.
Ich glaube Euch beiden, dass das Skript dort soweit einwandfrei läuft. Bei mir ist dies leider nicht der Fall und es macht keinen Spass, wenn man ein Skript zunächst einmal nur testen will und dann feststellen muss, dass es nicht vollständig läuft. Dann habe ich nicht viel Lust im Code nach (möglichen) Fehlerquellen zu suchen...
Oder ich bediene das Programm nicht richtig?
Aber danke trotzdem für die Bemühungen. |
|
| Nach oben |
|
 |
garry
Anmeldedatum: 25.10.2005 Beiträge: 396 Wohnort: switzerland
|
Verfasst am: Mi Jan 17, 2007 12:33 pm Titel: |
|
|
sorry ,
sollte einfach laufen, weiss leider nicht was falsch ist, evtl irgendwo noch ein sleep Funktion einbauen
bei mir muss ich jenachdem nach sleep modus das Program neu starten
Kurzanleitung:
start,Anzeige in Listview die Meldungs Schlagzeilen und Zeit
unten im schmalen Fenster die letzten Schlagzeilen
klicken links/mitte/rechts sollte Text Meldung sichtbar sein
das kleine Fenster wieder schliessen, erscheint neu wenn Aenderung |
|
| Nach oben |
|
 |
|
|
Du kannst Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum antworten.
|
Powered by phpBB © 2001, 2005 phpBB Group Deutsche Übersetzung von phpBB.de
|