[jawsscripts] Re: Week number

  • From: Jim Bauer <holdsworthfan@xxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Fri, 12 Mar 2010 09:45:16 -0600

This should get you started.
----------
Script getWeekNumber ()
var
int nmon, int nday, int totdays,
string smondays,
int nweek

let nmon = stringToInt(sysGetDate("M")) ;auto-expands for any 2 digit
returns
let nday = stringToInt(sysGetDate("d"))
let smondays = "31 28 31 30 31 30 31 31 30 31 30 31" ;leap years are
irrelevant here
let nmon = nmon - 1
while nmon
let totdays = totdays + stringToInt(stringSegment(smondays, " ",
nmon))
let nmon = nmon - 1
endWhile

let totdays = totdays + nday
let nweek = totdays / 7
if totdays % 7 > 0 && nweek < 52 then
let nweek = nweek + 1
endIf

sayString("This is week " + intToString(nweek) + ".\n")
EndScript

----------
"Michael" <mike_sharp@xxxxxxxxxxxxx> wrote on Thu, 11 Mar 2010
18:17:56 -0000:

>Hi all,
>
>I have seen scripts for extracting the system date and time but can JAWS 
>take the system date and tell you which week of the year you are in?
>
>Regards,
>
>Mike
>
>--------------------------------------------------
>From: <benedicjr@xxxxxxxxxxx>
>Sent: Thursday, March 11, 2010 11:16 AM
>To: <jawsscripts@xxxxxxxxxxxxx>
>Subject: [jawsscripts] Help for writing scripts
>
>> Hi. Anyone here know PopPeeper? I try to make an automatic read function
>> for some items in the status bar through using a frame. But I found out
>> that it's not stable so that's why I want to make scripts with same
>> function. I try to study but still no idea how that works. Can you please
>> help me to write this functions? Or will you write some for me? Please,
>> it would be a great help. Thanks...
>>
>> JR
>> __________
>> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>>
>> View the list's information and change your settings at
>> //www.freelists.org/list/jawsscripts
>>
>> 
>__________ 
>Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
>View the list's information and change your settings at 
>//www.freelists.org/list/jawsscripts

__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: