TechnicallyChris.com

Technical and Personal Ramblings of a Bostonian
  • Home
  • About Chris
  • Donate
  • Contact Chris
Home > Random Technology > Problems with WP-Syntax Plugin (GeSHi) with AutoIt

Problems with WP-Syntax Plugin (GeSHi) with AutoIt

March 24th, 2009
Goto comments Leave a comment

I’ve been having a problem with using the WordPress wp-syntax plugin to highlight my AutoIt code. In a nutshell, it would dump the span tags right onto the page instead of actually styling any of the code.

Not knowing quite how plug-ins work (or GeSHi for that matter), I hacked away at it a bit and it appears to be a problem with the size of one of the keyword arrays. It might be host specific (not enough memory allocated?) or PHP version, or WordPress, or who knows, but I was able to finally resolve the problem.

I broke the KEYWORDS\4 array up into two separate arrays (creating a KEYWORDS\7) and called it “autoitc.php” and it now appears to work fine. When I create my code blocks now I just use lang=”autoit2″ when posting code in my blog. Here’s an example:

1
2
3
4
5
6
7
8
#cs
This is a block of comments
It should be colored green
#ce
 
dim $tVar
$tVar = "Hello World"
ConsoleWrite(@AutoItPID & " " & $tVar)

To apply the same (very unsupported) fix, download this file and upload to same GeSHi folder that has the originally autoit.php. You can replace your existing one if you like with this, but it may get overwritten by updates.

UPDATE: I’ve ugraded to WP-Syntax 0.9.8 and it appears to resolve this issue.

If you enjoyed this article or it helped you in any way, I’d appreciate it if you’d post a comment below to let me know. All code examples are for demonstration only and should be used at your own risk. I cannot accept liability for unexpected results.

Chris Random Technology

Comments (0) Trackbacks (0) Leave a comment Trackback
  1. No comments yet.
  1. No trackbacks yet.
Subscribe to comments feed
Using the SbAdmCl for McAfee Endpoint Encryption Map Users for McAfee Endpoint Encrytion using AutoIt
RSS feed
  • Google
  • Youdao
  • Xian Guo
  • Zhua Xia
  • My Yahoo!
  • newsgator
  • Bloglines
  • iNezha

Sponsored By

Read my review of Mozy here.

Recent Posts

  • Just Bought the Google Nexus One
  • Seven Things I’ve Liked About Windows 7 in Seven Day
  • What’s Happened to Customer Service (Part 2)?
  • What’s Happened to Customer Service (Part 1)?
  • Capturing S.M.A.R.T. Hard Disk Data from WMI with AutoIt
  • Adjusting DCOM Settings via Script
  • How to Manually Call the Google Cache
  • RoboForm & RoboForm2Go Product Review
  • Updated PingCell Function for Excel
  • Creating Hyperlinks in Word and Excel Longer than 256 Characters

Categories

  • ColdFusion
  • Firefox
  • Google Nexus One
  • IIS
  • McAfee EE / SafeBoot
  • Microsoft Windows
  • Oracle
  • Random Code
  • Random Technology
  • Sports and Recreation
  • Subversion
  • The Untechnological

Archives

  • January 2010
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • October 2007
  • September 2007
  • August 2007
  • January 2007
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006

Meta

  • Register
  • Log in
PageRank
Top WordPress
Copyright © 2006-2010 TechnicallyChris.com
Theme by mg12. Valid XHTML 1.1 and CSS 3.