Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Garfield today source

1 replies · 1,870 views · Started 26 April 2003

as posted in the 9210 section of this forum

Made this for a friend of mine.
It can be used as a shortcut on desk to bring you your daily dose of Garfield nice and easy.

It does only one thing, start Opera and point to the newest garfield gif.

This will probably work for all 9210i users and for most 9210 users who have opera installed like: :\system\apps\opera\opera.app

Source is in the opl section of this forum
enjoy ...

the code:

[code:1]
INCLUDE "System.oxh"
rem need this for the SyRunApp
INCLUDE "Date.oxh"
rem need this to get our date

PROC main:
local currenttime&,string$(255),cmonth$(2),cday$(2),app$(10)
IF exist("c:\system\apps\opera\opera.app")or exist("d:\system\apps\opera\opera.app")
app$="opera.app" rem for all those 9210 users who have opera installed and can watch gif files with it
giprint "Starting Opera(SDK)"
else
app$="web.app" rem for all the 9210i users, 9210 users without opera will get a error from web app
giprint "Starting internal browser"
ENDIF
currenttime&=DTNow&: rem getting the current time (doh)
cmonth$=gen$(DTMonth&:(currenttime&),2) rem current month
cday$=gen$(DTDay&:(currenttime&),2) rem jadajadajada
IF (len(cmonth$)=1) rem if we have 4 make it 04
cmonth$="0"+cmonth$
ENDIF
IF (len(cday$)=1) rem 5 -> 05
cDay$="0"+cday$
ENDIF
string$="http://images.ucomics.com/comics/ga/"+gen$(DTYear&:(currenttime&),4)+"/ga"+right$(gen$(DTYear&:(currenttime&),4),2)+cmonth$+cday$+".gif" rem creating the link for the image of the day
SyRunApp&:(app$,string$,"", 0) rem rock & roll
ENDP rem end
rem even more the end[/code:1]

enjoy 😊

The previous code didn't work on other devices 😉
this one does:
[code:1]
IF exist("z:\system\apps\opera\opera.app")
app$="opera.app" rem 9210i
giprint "Starting Opera"
else
app$="web.app" rem 9210
giprint "Starting Nokia browser"
ENDIF
[/code:1]