Jul 162012
 

I’ve recently put some advertisements on my blog in an attempt to earn some extra ca$h on the side, however since it has not been very successful, I would like my readers input on whether the advertisements should go or not ?

Do they bother you ?
Are they in the way ?
Would you rather no advertisements ?

Let me know in the comments !

Share
Jul 162012
 

I’ve used this script to create a To-Do list based on the tasks I have in Outlook.

First up, we create the Outlook ActiveX Object

outlookApp = new ActiveXObject("Outlook.Application");
nameSpace = outlookApp.getNameSpace("MAPI");
nameSpace.logon("","",false,false);

Then we specify the default folder as the “Tasks” in Outlook

Tasks = nameSpace.getDefaultFolder(13);

Then we create the myTasks object from the items within the Outlook task list.

myTasks = Tasks.Items;

I have used a for loop here to go through all the tasks, however a while loop can also be used.
The first line gets the amount of tasks that exist, and then I create a variable to store all the tasks that I have, and then the for loop then goes through them all.

count = myTasks.Count;
result = '';
for(x = 1; x <= count; x++) { result += "-"+myTasks(x)+ "\n"; }

Now at the end I log off Outlook and clear all the variables.

nameSpace.logoff();
olLoggedOn = false;
nameSpace = null;
outlookApp = null;

Placing that code into a JScript file for execution from another program, e.g. Samurize, or creating a little HTML application will then allow you to look at your Outlook tasks without needing Outlook open.

If you have multiple categories which you want multiple lists for, you can restrict them using "Categories" property.
For example, if I only wanted Tasks that had the category of "blog", I could restrict it via the categories property.

myTasks = Tasks.Items;
myTasks.Restrict("[Categories] = blog");

The myTasks object will now only contain items that has the category blog.

The same can be done with the "Completed" flag

myTasks = Tasks.Items;
myTasks.Restrict("[Complete] = false");

Now the myTasks item will only contain items that aren't marked as completed.

Hopefully this helps someone out there !
Happy Coding !

Share
Jul 132012
 

I was trying to integrate CA Spectrum with CA NetQOS/NPC and it kept failing with a Bind Failure message when I tried to add Spectrum as a data source.
The error was that I was missing the netqos_integ.interface_addresses table.

Turns out that the integration did not work as it was supposed to, and I had to drop the 4 tables that was in the netqos_integ database, restart the OneClick services on the OneClick server, and then do the integration again. After I did that, I was able to add in Spectrum as a data source.

To check to see if the table really is missing or not, you can login to the MySQL instance on the OneClick server by running these commands on the OneClick server

bash
cd $specroot\mysql\bin
./mysql -uroot -proot netqos_integ
show tables;

This will spit out a list of tables, of which interface_addresses should be one.
If it’s not there, then you may have the option of fixing it if the format file is around.
To do that, quit the MySQL command line client first, and then find your way to the data directory.

cd $specroot\mysql\data\netqos_integ

If there is a filed called interface_addresses.MYD or a couple of files called interface_addresses.MYI and .FRM then you can run this command in the MySQL command line client to repair the table

repair table interface_addresses USE_FRM;

Otherwise, if there’s no format file, then drop the tables, and then do the integration again.

drop tables;

Then restart the OneClick services via services.msc and try again.

Hope this helps someone out there !

Share
Jul 132012
 

Recently, I wanted to make a script to read the subjects from a set of emails that I was receiving that was telling me what jobs I’d been assigned in the internal ticketing system at work.
Each time I got assigned a job, it would send me an email. Using this little scriptlet, I made a display to show me what the subjects were so I could see what jobs I had.

First step is to create the ActiveX object that taps into Outlook, and set that object up.

outlookApp = new ActiveXObject("Outlook.Application");
nameSpace = outlookApp.getNameSpace("MAPI");
nameSpace.logon("","",false,false);

Once the object has been setup, we can select the desired folder.
The getDefaultFolder(6) selects the Inbox as the folder start from.
The Inbox object then has all the folders under the Inbox assigned to it.

mailFolder = nameSpace.getDefaultFolder(6);
var Inbox = mailFolder.Folders;

Next up, I’m selecting the subfolder that I want the email subjects from, and assigning it to the box variable.

var box = Inbox.Item("SRs Assigned To Me").Items;

This bit is where we read the subjects from the emails themselves.
We get the first item in the folder using the GetFirst method, then we use a while loop to keep getting the subjects until there are no more emails. In this example, all the subjects are appended to the list variable, but you can choose to put them into an array, or echo them out directly using WScript.Echo. The choice is up to you.

var boxmail = box.GetFirst;
var list = '';
while(boxmail != null) {
list += boxmail.subject+"\n";
boxmail = box.GetNext;
}

Lastly, we tell the script to tell outlook to close all the connections that it opened to read the emails.

nameSpace.logoff();
olLoggedOn = false;
nameSpace = null;
outlookApp = null;

With this script, you can view other properties of the emails, or count how many emails you have in a specific folder, or even in the Inbox itself. Putting this snippet into an HTA will even allow you to make a little email counter window.

Share
Jul 122012
 

So I just found out about Fiverr. Pay $5 for someone to do something for you !
Sounds interesting, so I put up my idea up there.
If anyone wants to have a look at my Fiverr Idea, the link is here

Share