sms mobile nokia using computer, only status unread - windows-xp

reading sms from mobile phone nokia, have two methods read all or read only one.
but how to
reading only sms with status "rec unread"
using hyper terminal windows xp

Are you using an AT command interface?
The standard AT+CMGL (list all messages) command can be given a parameter with the status, 0 is REC UNREAD so
AT+CMGL=0
should give you only REC UNREAD messages.
Note that listing or reading a REC UNREAD message causes it to become REC READ.

Related

AppleScript code for copying new email subject

I'm setting up a rule in my Mail app to execute the AppleScript below when an email from a specific sender arrives. My goal is to copy the incoming email's subject line, however, this script is copying the subject of the currently selected email in the main inbox and not the arriving email's.
Is there a better way to achieve my goal?
tell application "Mail"
set _msgs to selected messages of message viewer 0
if (_msgs is not equal to missing value) then
set _msg to first item of _msgs
set the clipboard to (subject of _msg) as string
end if
end tell
You need to use the built-in handlers that Mail exposes to access the message associated with a rule activation; selected messages of message viewer 0 just accesses the active Mail window (as you describe). Instead, use Mail's on perform mail action handler to correctly access the message. See this question (and this answer) for more information.
Here is your code, re-written to correctly copy the subject line of incoming emails that satisfy the provided rule criteria. It's working for me on macOS Catalina 10.15.5:
using terms from application "Mail"
on perform mail action with messages _msgs for rule _rule
if (_msgs is not equal to missing value) then
set _msg to first item of _msgs
set the clipboard to (subject of _msg) as string
end if
end perform mail action with messages
end using terms from

How to enter an option during voice calls using at commands

I've been using a sim900 module to replicate many of the functions found in a basic cellphones for an embedded project. I've been successful with most functions with the exception of entering options during a voice call. I am actually looking for a generic solution (e.g. GSM 07.07 etc.) although the GSM/GPRS Module I'm using is the sim900.
Scenario: I initiate a call using ATD<number>; ,then automated voice asks me to dial "1" for an option. How do I send the "1"?
I've search high and low for an answer. I've been through the AT command manual over and over again. Please help.
Very good start in using the official GSM specification, although I want to note that 07.07 has been superseded by 27.007 a very long time ago, and you should use that document (or 27.005 if relevant).
I initially expected there to be two ways of achieving this, dial string modifiers or DTMF command, but I looking up the dial string in the 27.007 specification I do not find the p (pause) modifier1 I was expecting, and nearest thing, the W (wait) modifier is ignored and only included for compatibility.
Sending 0 through 9, A through D, * and # during a call is done using DTMF, although in a GSM network this is signalled separately out of band rather than sending in-band analogue tones. There is a specific command for sending DTMF tones called AT+VTS (with a horrible syntax). So that command is the answer to you question. Invoke it either from online command mode or from another serial connection.
1 The reason I was expecting a p modifier to exist is that I am able to enter one in phone book entries, e.g. `"12345678p123" which will dial 12345678, wait for the connection to be established and then send 123 as DTMF tones. But this is then obviously something (only) the user interface voice call handler manages and not the AT command handler.

How to fetch mails from folder/sub folder other than INBOX?

I have got the code to read the mail from my INBOX folder.
But, i am unable to read the mails from folders other than INBOX.
Below is my code used for fetching mail only from my INBOX.
; display mail but don't delete from mailbox
testmail6 ;
new mailserver,status,err,mailMsg
set mailserver=##class(%Net.POP3).%New()
set mailserver.AttachDir="d:\attach\" ; need terminating \
set mailserver.StoreAttachToFile=1
write !,"Calling Connect"
set status=mailserver.Connect("Server.com","user","password")
if $$$ISERR(status) do DecomposeStatus^%apiOBJ(status,.err) write !,err(err),! quit
write !,"Calling Fetch to retrieve the oldest message on the server."
set status=mailserver.Fetch(1,.mailMsg,0)
if $$$ISERR(status) do DecomposeStatus^%apiOBJ(status,.err) write !,err(err),! quit
write !,"from="_mailMsg.From
write !,"to="_mailMsg.Headers.GetAt("to")
write !,"date="_mailMsg.Date
write !,"subject="_mailMsg.Subject
write !,"messagesize="_mailMsg.MessageSize
do DumpMessage(mailMsg)
quit
Unfortunately you can't do it in any language, because POP3 does not support any folders at all, just list of all incomming messages. Such folders supports in IMAP, but Cache does not have any realizations of using it by default.
You can found here a guy who offer his IMAP adapter, it is may help you

How to send private message to all users in an IRC channel?

How to send the same private message to all users in a room in an IRC channel in a rather automated way, that is, not having to do it manually for all users one by one and not having to post the message in the channel room.
To be used wisely, sure.
As you can see in the RFC 1459 that describes the IRC protocol, private messages are technically not different from channel messages. Both are the result of the PRIVMSG
command.
The PRIVMSG command allows any client to send messages to several recipients, using the following syntax:
PRIVMSG foo,bar[,anon] :Hi there for users
PRIVMSG #help,#home[,#irc] :Hi there for channels
That's supposed to work mixed-up as well.
So basically, a single target has to be either a channel or a user.
As far I read, there is no way of doing that, since every target has to be defined in the first parameter of the command.
This depends on your network. Some networks support wallmsg which works on many IRC clients as a private message to the user. This is achieved on efnet for example by sending a message to ##channel which then distributes the message to all channel ops. Equally use + to send a message to all voiced users. Unfortunately, this does not work for non-op/voice users. This works by doing PRIVMSG ##channel :Hi!
To be able to do that, in an automated fashion, you would need to write a simple script (can't help you there, you haven't stated your client) that loops over all users and then sends a PRIVMSG to them one by one or in the mass message mode where you separate the users by commas (and no spaces) like PRIVMSG user1,user2,user3 :message.
Most likely you want the latter option. Be careful with your flood thresholds though!
You could add a line to your mirc popups nick list
...message all selected {%i = 0 | %nicks = "" | :nextnick | inc %i | if ($snick(#,%i) == $null) { if ($len(%nicks) > 0) /msg %nicks $$?="message " | halt } | %nicks = %nicks $snick(#,%i) | if (4 // %i) { /msg %nicks $$?="message " | %nicks = "" } | goto nextnick | }
i use this on my network along with op all and deop all or kick all

Why does this AppleScript get an "AppleEvent handler failed" error on Mac OS X 10.5 Leopard?

First, I know, Leopard is the old-fogey at this point, but it's the minimum I'd like to be able to support with this script, so please bear with me (it's not even possible under Mac OS X 10.4 Tiger due to a bug w/Mail redirect/forward/reply bug I had uncovered long ago).
I've been revisiting building an AppleScript to work in conjunction with Topic Desk's spamtrainer, so it goes through a selection of messages in the Junk folder and attempts to redirect them to a specified mailbox. Here's what I have so far (note that the actual sending is commented out at the moment, more on that later):
(* Train Spam - Redirect (not forward) email from the Junk folder (which hasn't already been redirected or
* determined by the mail server to be spam) to an appropriate spam mailbox on the mail server.
* Developed to be used in conjunction w/spamtrainer on a Mac OS X Server mail server.
*
* v0.1 2011-07-27 - Morgan Aldridge
* Initial version.
*)
using terms from application "Mail"
on perform mail action with messages selectedMsgs in mailboxes selectedMailboxes
tell application "Mail"
-- configuration variables
set junkPrefix to "***JUNK MAIL***"
set junkRecipient to "junkmail#domain.tld"
-- ensure that we're in the Junk mailbox
-- (it'd be disasterous to accidentally redirect mail for training from another mailbox)
if (count of selectedMailboxes) is 1 and (first item of selectedMailboxes) is junk mailbox then
set selCount to (count of selectedMsgs)
set redirectedCount to 0
repeat with counter from 1 to selCount
set msg to item counter of selectedMsgs
-- if the subject doesn't start with junkPrefix and the message hasn't already been redirected, then redirect it
-- (otherwise, if it starts with junkPrefix, it means it was already detected as junk by the mail server)
-- (and, obviously, if it was already redirected, that was probably for the sake of junk training as well)
if subject of msg does not start with junkPrefix and not was redirected of msg then
set newRedirectMsg to redirect msg with opening window
tell newRedirectMsg
-- set the to recipient to that of the specified spam mailbox on the mail server
make new recipient at beginning of to recipients with properties {address:junkRecipient}
-- remove any bcc or cc recipient (we don't want to be spamming anyone else in the process)
delete bcc recipients
delete cc recipients
end tell
-- actually send the message
-- send newRedirectMsg
else
display dialog "Oops, the message was already flagged as junk by the mail server or you've already redirected it!"
end if
end repeat
else
display dialog "Oops, you're not in your Junk mailbox!"
end if
end tell
end perform mail action with messages
end using terms from
-- this is required when _not_ running from the Script menu (e.g. Script Editor, FastScripts, etc.)
using terms from application "Mail"
on run
tell application "Mail" to set sel to selection
tell application "Mail" to set selBox to selected mailboxes of message viewer 1
tell me to perform mail action with messages (sel) in mailboxes (selBox)
end run
end using terms from
When running it from Script Editor.app (so it goes through the on run and tell me to) and a small number of Junk messages select in Mail (this is under Mac OS X 10.5.8 Leopard), it seems to work for the first message (opening a new redirected message, w/to recipient set, and CC/BCC fields emptied), and the other redirected message windows open, but their To/CC/BCC fields are not updated and Script Editor.app pops up the dialog with the "Mail got an error: AppleEvent handler failed" error. The contents of the Event Log are as follows:
tell application "Mail"
get selection
{message id 464214 of mailbox "Junk", message id 464213 of mailbox "Junk", message id 464211 of mailbox "Junk"}
get selected mailboxes of message viewer 1
{junk mailbox}
get junk mailbox
junk mailbox
get subject of message id 464214 of mailbox "Junk"
": Your Invitation Into a Global Directory"
get was redirected of message id 464214 of mailbox "Junk"
false
redirect message id 464214 of mailbox "Junk" with opening window
outgoing message id 400031520
make new recipient at beginning of every to recipient of outgoing message id 400031520 with properties {address:"junkmail#domain.tld"}
to recipient 1 of outgoing message id 400031520
delete every bcc recipient of outgoing message id 400031520
delete every cc recipient of outgoing message id 400031520
get subject of message id 464213 of mailbox "Junk"
"Nominate Your Favorite Products for the Community Choice Awards"
get was redirected of message id 464213 of mailbox "Junk"
false
redirect message id 464213 of mailbox "Junk" with opening window
outgoing message id 378471104
make new recipient at beginning of every to recipient of outgoing message id 378471104 with properties {address:"junkmail#domain.tld"}
"Mail got an error: AppleEvent handler failed."
So, clearly it seems like the failure is with setting the to recipients in all but the first message. Subsequent runs of the script without relaunching Mail result in failures on the first message as well.
The oddest part of this issue is that, when quitting mail after running the script, there's a hidden, blank window for each of the redirected messages (even the one that was successful) that pops up asking if you want to save changes or not. This sounds very similar to something noted in this thread, but I'm not sure what causes it.
So, what's causing this error and failure? How can I resolve it? And, for extra credit, why are the hidden, blank messages created and how can I prevent that from occurring?
Your script looks fine to me.
If I were you, I would try running the script in another OS X account on the same computer, repair permissions, look at your logs (you've already done that, but it's still a good idea), run all relevant software updates, temporarily move your ~/Library/Mail folder to eliminate it as a factor, etc. Tell me what happens, especially if it works again :)