Hi, Danny,
Thanks for your help. Learned something from you code
However, this filename is not I want, I am using DP change script, in that script, there is one sentence to change the DP:
Messenger.MyDisplayPicture = fileName;
What I want is to update the personal message at the same time, but it seems what I tried so far can only update the filename of the previous images, always one image behind. Really strange. I used :
Messenger.MyPersonalMessage=fileName;
tmpString =Messenger.MyPersonalMessage;
tmpString =tmpString.substring(tmpString.lastIndexOf('\\')+1);
tmpString =tmpString.substring(0,tmpString.length-4);
MsgPlus.DisplayToast("",tmpString);
immediately aft that sentence, but it seems fileName is the current new picture, while my tmpString can only have the old filename. I knew this because the last sentence showed the tmpString in toast window and my personal message is showing the correct filename with full path. Really headache, is it due to the personal message change cannot be so quick?