{"id":423,"date":"2019-08-11T14:41:25","date_gmt":"2019-08-11T14:41:25","guid":{"rendered":"https:\/\/delphijustin.biz\/?p=423"},"modified":"2021-10-13T20:07:28","modified_gmt":"2021-10-14T01:07:28","slug":"delpfo-information-app","status":"publish","type":"post","link":"https:\/\/delphijustin.biz\/delpfo-information-app\/","title":{"rendered":"DelpFo information app"},"content":{"rendered":"\n<p>This app draws text on the top left corner of the screen. It has UTC Time, Uptime, last IRC Channel message in mIRC, Error Of The Day, Memory Load, IP Addresses and Phase Of The Moon. It&#8217;s lightweight and open source.<\/p>\n\n\n\n<input type=\"hidden\" name=\"_fmakey\" id=\"fmakey\" value=\"103e4fd117\"><div id=\"file_manager_advanced\"><\/div>\r\n<p><center>All programs are virus free. Some antivirus software might say its \"suspicious\" or a \"Potentionaly Unwanted Program\". Some of them rate them on what there code looks like no matter if theres a definition in the virus database. If any of them are detected any Antivirus I will zip the software with the password \"justin\" j is lowercase<\/center><br><iframe src=\"\/wp-content\/downloads\/gethashes.php?app=delpfo\" height=\"255px\" width=\"100%\">\r\n\t<form action=\"\/wp-content\/downloads\/gethashes.php\" method=\"get\" target=\"apphashes\">\r\n\t\t<input type=\"hidden\" name=\"app\" value=\"delpfo\">\r\n\t\t<input type=\"submit\" value=\"Get File Hashes\">\r\n\t<\/form>\r\n\t\t<\/iframe><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">program delpfo; \n{$RESOURCE DelpFo32.RES} \nuses\u00a0\u00a0 SysUtils,\u00a0\u00a0 Windows,\u00a0\u00a0 graphics,\u00a0\u00a0 Classes,\u00a0\u00a0 mIRCc in '..\\delphi\\TmIRCControl\\mIRCc.pas'; \nconst AppName='delpFo'; DB_HOLIDAY_DATE='%u\/%u'; DB_HOLIDAY_YEAR=DB_HOLIDAY_DATE+'.year'; DELPFO_ATOM_CLOSE='DELPFO_CLOSE'; DELPFO_ATOM_MAIN='DELPFO_APP'; SWITCH_MOON='\/MOON'; SWITCH_HOLIDAY='\/HOLIDAY'; SWITCH_CLOSE='\/CLOSE'; SWITCH_UTC='\/UTC'; SWITCH_UPTIME='\/UPTIME'; SWITCH_MEM='\/MEM'; SWITCH_BOLD='\/BOLD'; SWITCH_IPV4='\/IPV4'; SWITCH_RIGHT='\/RIGHT'; SWITCH_POSX='\/POSX'; SWITCH_ERROR='\/ERROR'; SWITCH_MIRC='\/MIRC'; SWITCH_POSY='\/POSY'; SWITCH_FC='\/FC'; SWITCH_FONT='\/FONT'; SWITCH_FSIZE='\/FSIZE'; type TMoonInfo=record MoonType:byte; end; var utc,moontime:systemtime; monitor:tcanvas; args,IPs:tstringlist; i:integer; uptime:tdatetime; moon:tmooninfo; Text:string; mem:memorystatus; hk,netadaptors:hkey; enabledhcp,netcount,rs:dword; mIRC:TMIRCControl; buff,kname:array[0..max_path]of char; r:trect; label loop; procedure close; var error:dword; begin error:=0; if globaldeleteatom(globalfindatom(DELPFO_ATOM_CLOSE))>0then error:=error or 1; if Globaldeleteatom(globalfindatom(delpfo_atom_main))>0then error:=error or 2; if releasedc(getdesktopwindow,monitor.handle)=0then error:=error or 4; mirc.Destroy; exitprocess(error); end; function PhaseOfMoon(var systime:systemtime):TMoonInfo; var b,c,e,jd:double; begin systime.wMonth:=systime.wMonth-1; if systime.wMonth&lt;3then begin systime.wYear:=systime.wYear-1;systime.wMonth:= systime.wMonth+12;end;systime.wMonth:=systime.wMonth+1;c:=365.25*systime.wYear; e:=30.6*systime.wMonth;jd:=c+e+systime.wDay-694039.09;jd:=jd\/29.5305882;b:=trunc( jd);jd:=jd-b;b:=round(jd*8); if b >= 8 then b:=0; result.MoonType:=trunc(b); end; function ErrorOfTheDay:integer; label loop; begin randseed:=trunc(date); loop:result:=random(16000); if length(SysErrorMessage(result))=0then goto loop; end; function FormatHoliday(fmt:string;systime:systemtime):string; begin result:=format(fmt,[systime.wMonth,systime.wDay]); end; function getHoliday:string; var ltime:systemtime; res:tresourcestream; holidays:tstringlist; begin getlocaltime(ltime); holidays:=tstringlist.Create; res:=tresourcestream.Create(hinstance,'HOLIDAYS','DATABASE'); holidays.LoadFromStream(res); result:=format(holidays.values[formatholiday(db_holiday_date,ltime)],[ltime.wyear- strtointdef(holidays.values[formatholiday(db_holiday_year,ltime)],0)]); holidays.Free; res.Free; end; begin args:=tstringlist.Create; for i:=1to paramcount do args.Add(paramstr(i)); if args.Count=0 then begin messagebox(0,pchar( 'Usage:'+extractfilename(paramstr(0))+' &lt;parameters>'#13#10+ '\/UPTIME\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Shows uptime'#13#10+ '\/MEM\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Global memory status'#13#10+ '\/UTC\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Universal Time Coordinates'#13#10+ '\/IP4\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Shows IPv4 Addresses'#13#10+ '\/MOON\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Shows phase of moon'#13#10+ '\/POSX=x \/POSY=y\u00a0 Position on the screen where to draw text'#13#10+ '\/RIGHT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Draw onto top right'#13#10+ '\/FONT=NAME\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Specifies font-name.'#13#10+ '\/FC=COLOR\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Font-color in hexadecimal'#13#10+ '\/FSIZE=SIZE\u00a0\u00a0\u00a0\u00a0\u00a0 Font size'#13#10+ '\/ERROR\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Error of the day'#13#10+ '\/MIRC=Channel\u00a0\u00a0\u00a0 Shows the last chat channel message in mIRC'#13#10+ '\/HOLIDAY\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Shows the current holiday, if theres is one.'#13#10+ '\/BOLD\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Use Bold Font' ),'DelpFo Help',0); exitprocess(0); end; if args.IndexOf(SWITCH_CLOSE)>-1then begin if globalfindatom(delpfo_atom_main)>0then begin globaladdatom(delpfo_atom_close);globaldeleteatom(Globalfindatom(delpfo_atom_main)); end else begin Messagebox(0,PChar(loadstr(106)), appname,mb_iconinformation);exitprocess(dword(-1)); end; exitprocess(0); end; if globalfindatom(DELPFO_ATOM_MAIN)>0then begin messagebox(0,pchar(loadstr(104)),appname,mb_iconwarning);exitprocess( error_already_exists); end; globaladdatom(delpfo_atom_main); getclientrect(getdesktopwindow,r); r.TopLeft.x:=StrToIntDef(args.values[switch_posx],0); r.TopLeft.y:=strtointdef(args.values[Switch_posy],0); monitor:=tcanvas.Create; monitor.Handle:=GetWindowDC(getdesktopwindow); if args.IndexOfName(switch_font)>-1then monitor.Font.Name:=args.Values[SWITCH_FONT]; monitor.Font.Color:=StrToIntDef('$'+args.values[SWITCH_FC],0); monitor.Font.Size:=strtointdef(args.values[switch_fsize],monitor.Font.Size); if args.IndexOf(switch_bold)>-1then monitor.Font.Style:=[fsBold]; mirc:=tmirccontrol.create(nil); loop: text:=''; getsystemtime(utc);Getlocaltime(moontime); uptime:=encodetime(0,0,0,1)*gettickcount; mem.dwLength:=sizeof(mem); globalmemorystatus(mem); if args.IndexOf(SWITCH_UPTIME)>-1then Text:=format(loadstr(100),[trunc( uptime),formatdatetime(loadstr(101),uptime)]); if args.IndexOf(SWITCH_UTC)>-1 then text:=text+'UTC:'+formatdatetime(loadstr(105), systemtimetodatetime(utc))+#32; if args.IndexOf(SWITCH_MEM)>-1then text:=text+format(loadstr(102),[ mem.dwMemoryLoad]); regopenkey(HKEY_LOCAL_MACHINE, 'SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces',netadaptors); regqueryinfokey(netadaptors,nil,nil,nil,@netcount,nil,nil,nil,nil,nil,nil,nil); if args.IndexOf(SWITCH_IPV4)>-1then begin ips:=tstringlist.Create; for i:=0to netcount-1do begin regenumkey(netadaptors,i,kname,max_path); regopenkey(netadaptors,kname,hk); rs:=4; regqueryvalueex(hk,'EnableDhcp',nil,nil,@enabledhcp,@rs); rs:=max_path; if enableDhcp=1then regqueryvalueex(hk,'DhcpIPAdress',nil,nil,@buff,@rs)else regqueryvalueex(hk,'IPAddress',nil,nil,@buff,@rs); ips.Add(buff); regclosekey(hk); end; text:=text+'IPs:'+ips.CommaText; ips.Free; end; text:=text+#32; regclosekey(netadaptors); if args.IndexOf(SWITCH_MOON)>-1then begin moon:=PhaseOfMoon(moontime); text:=text+format(loadstr(103),[loadstr(200+moon.MoonType)]); end; if args.IndexOfName(switch_mirc)>-1then begin mirc.active:=false; mirc.mIRCHandle:=findwindow('mIRC',nil); mirc.Active:=true; text:=text+mirc.GetLastLine(args.values[switch_mirc])+#32; end; if args.IndexOf(switch_holiday)>-1then text:=text+GetHoliday; if args.IndexOf(switch_error)>-1then text:=text+'EOTD:'+ syserrormessage(erroroftheday)+#32; if args.IndexOf(SWITCH_RIGHT)>-1then r.Left:=r.Right-(5+monitor.TextWidth(text)); monitor.TextOut(r.TopLeft.x,r.TopLeft.y,text); if globalfindatom(delpfo_atom_close)>0 then close; sleep(1000); goto loop; end.<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1212\" height=\"181\" src=\"https:\/\/i1.wp.com\/delphijustin.biz\/wp-content\/uploads\/2019\/08\/DelpFo-example.gif?fit=640%2C96&amp;ssl=1\" alt=\"\" class=\"wp-image-430\"\/><figcaption>ScreenShot<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This app draws text on the top left corner of the screen. It has UTC Time, Uptime, last IRC Channel message in mIRC, Error Of The Day, Memory Load, IP Addresses and Phase Of The Moon. It&#8217;s lightweight and open source.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"beyondwords_generate_audio":"","beyondwords_project_id":"","beyondwords_content_id":"","beyondwords_preview_token":"","beyondwords_player_style":"","beyondwords_language_id":"","beyondwords_title_voice_id":"","beyondwords_body_voice_id":"","beyondwords_summary_voice_id":"","beyondwords_error_message":"","beyondwords_disabled":"","beyondwords_delete_content":"","beyondwords_podcast_id":"","beyondwords_hash":"","publish_post_to_speechkit":"","speechkit_hash":"","speechkit_generate_audio":"","speechkit_project_id":"","speechkit_podcast_id":"","speechkit_error_message":"","speechkit_disabled":"","speechkit_access_key":"","speechkit_error":"","speechkit_info":"","speechkit_response":"","speechkit_retries":"","speechkit_status":"","speechkit_updated_at":"","_speechkit_link":"","_speechkit_text":""},"categories":[4],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/posts\/423"}],"collection":[{"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/comments?post=423"}],"version-history":[{"count":5,"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/posts\/423\/revisions"}],"predecessor-version":[{"id":4004,"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/posts\/423\/revisions\/4004"}],"wp:attachment":[{"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/media?parent=423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/categories?post=423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/tags?post=423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}