Code Snippets

Anything Really. Just keep it clean!

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Code Snippets

Post by Marcus Tettmar » Fri Mar 28, 2014 1:22 pm

You may notice a new link at the top right of the forum nav marked "* Code Snippets".

If you are logged into the forums you can use this to create special links and embed codes for pieces of script code.

You will all be aware how email, instant messaging, forums etc have a tendency to garble script code. The aim of Code Snippets is to avoid all that.

If you need to send code to someone in an email or live chat (e.g. it could be to our support desk) or instant messaging or indeed here on the forums first go to Code Snippets and create your snippet. This page will show you all your existing snippets and you can create new ones.

Enter a title and paste in the code and hit Save. You will then be given a special public link which you can send someone. When they go to that link they will see the code all nicely formatted and a link to the raw text. Copying from this page will ensure the code is kept intact when pasted into Macro Scheduler.

You will also be given a special embed code which you can paste into these forums. When the message is displayed your embed code will be replaced with a nicely formatted version of your script code.

For now the old code button is still active and still works and I have no intentions of replacing that altogether. This is just a new way of sharing code and for now it is in beta.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Apr 03, 2014 2:12 pm

Using Firefox. Picking the "* Code Snippets" link is sending me to http://www.mjtnet.com/usergroup. If I hover over the link I see http://www.mjtnet.com/user_snippets.htm.

Seems to work fine using IE


A little more experimenting and I find (after clearing the cache) if I log in to the forum then pick the snippets link in Firefox, all works as planned. However, if I first pick the snippets link which asks me to log into the forum after logging in I'm returned to the forum and all I get is the forum when I pick the snippets link.

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Apr 03, 2014 2:46 pm

Seems to be the way Firefox is caching the request. First time you visited the link you prob weren't logged in so it redirected you to the forum login.

Next time you are logged in, you revisit the page, but Firefox is aggressively caching and ignores the script sending you back to the forum login and since you are logged in you then get redirected to the forum main page.

If you copy the link and add ?dfgdfgdfgg to the URL it works.

So basically we need to switch off caching for this page.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Apr 03, 2014 2:57 pm

Should be fixed now, although until you clear your own cache you won't see any difference. In future the page shouldn't get cached.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts