A few years ago I created a script that would run from a button on a form. The button dials a phone number that is in a field on the form.
I lost this code so I had to recreate it. (I can't take full credit for this script... but unfortunately I don't remember who helped... if it was you, thanks, and please add your comments to this thread).
The reason for this post is a) to save me some time next time I loose the code... I hope that this is never ! :-)
b) to assist other developers that may need this functionality
Here is the code... hope it helps someone.
... hope it helps someone.
I lost this code so I had to recreate it. (I can't take full credit for this script... but unfortunately I don't remember who helped... if it was you, thanks, and please add your comments to this thread).
The reason for this post is a) to save me some time next time I loose the code... I hope that this is never ! :-)
b) to assist other developers that may need this functionality
Here is the code... hope it helps someone.
Code:
'Date Created: 22-Nov-2014 09:01:46 AM 'Last Updated: 22-Nov-2014 09:26:25 AM 'Created By : David 'Updated By : David 'Dial Phone Using Skype 'This Script requires a Skype User Name String that is stored in Global Var Var->SkypeUserStr The string contains a valid Skype™ user name 'Also... Skype™ must be running on the server 'Create a Global Variable 'NumberToSkype' and place a field for this variable on the current form dim SkypeString As C SkypeString = "Skype™ - " + Var->SkypeUserStr 'Update value in existing variable 'NumberToSkype' to '=alltrim(Homephone) Var->NumberToSkype = convert_type(a5_eval_expression("=alltrim(Homephone)",local_variables()),"c") 'Homephone is a field on the current form 'Refresh 'NumberToSkype' in current form. topparent:NumberToSkype.refresh() 'Execute inline Xbasic code. :clipboard.set_data(chrtran(alltrim(VAR->NumberToSkype)," ","")) ':clipboard.set_data(VAR->NumberToSkype) 'sys_focus_put("Skype™ - xxxxx.xxxxx") ' ™ is a 'special chr'... ALT - 0153 HTML ™ xxxx.xxxxx is a valid Skype user name be sure that Skype is running sys_focus_put(SkypeString) 'Send keystrokes to the active object. sys_send_keys("{^D}") sys_send_keys(Var->NumberToSkype) sys_send_keys("{ENTER}")
Comment