Showing posts with label _Hacks. Show all posts
Showing posts with label _Hacks. Show all posts

2009-08-21

PlayTTS from highlighted app text...

For the PC, this is the cleanest ~ quickest TTS(text to speech) option I've come up with.

  1) Download and extract the .exe files from this Zip
       (to the same folder):
       CopyPlayTTS.zip
  2) Drag the 'CopyPlayTTS.EXE' to your quick launch.
  3) Highlight some text in any (most) applications

 4) Click the

button in your quicklaunch
Notes:

{Escape} stops the speaking text.

The .exe files are compiled AutoIt scripts.
You can save them anywhere-just as long as
they're in the same folder.

Example use of CopyPlayTTS:

Example use of CopyPlayTTS

Example use of CopyPlayTTS 2 : CopyPlayTTS makes text file ~ stores in 'My Documents'...

2009-05-05

ChromeStart.wsf

Here's a script to start one or more Google Chrome profiles.


For more try a search for 'profiles'.



ChromeStart.wsf_


2009-04-22

SVN command line

I've been using Subversion command line on a network. In that context I've found it faster than the Tortoise SVN client (& more configurable).


In order to make this easier I created an HTA and .CMD file to configure a user and apply it in the command line parms.


Stores your SVN user & Pass in registry:

svn_cfg.cmd_


Fetchs SVN user & Pass for use with command line parms:

svn_cfg.hta_


Google 'SlikSVN'(check the download links):

Google SlikSVN


Useful configurability:

Changelists

2009-02-27

WhoAmI.HTA_

Simple utility to display workstation ~ machine, user, IP.

Right-click 'Save As(without "_") WhoAmI.HTA_

2009-02-24

BrowseThis.hta_

I wanted a tool that allowed me to quickly switch between browsers or launch a file or short-cut with different browers. I created this with that intent.

It is not perfect. If there are multiple-accounts - multiple installs across those accounts - a certain browser listed may _not_ be accessible. Reason being - it creates list by querying system registry for HKLM\Software\Clients\StartMenuInternet" and it's subkeys. To do this it uses 'reg query' - which has differing output depending on your version of windows. If it doesn't work for you let me know what version your on.

When first run - if you have a sidebar it will ask whether you want the tool "Left aligned?"(default) - if you say no, it will assume your sidebar is on the right.

If you're wondering about left align default - I'm left handed. :)

BrowseThis.hta_

Note: save without the "_" suffix.

History:
v.13 mtb - 03/13/2009 - replace keydown with keypress. v.12 mtb ~ 03/14/2009 - added 'TTS' as browser option - changed input text box for url to textarea - so this now works in concert with TTS.HTA (if present)

v.11 mtb ~ 03/14/2009 - added 'ReaPlayer'(if exists on system) to list of 'browsers'

2009-01-25

TTS.HTA





I love to read(see the link to Project Gutenberg at bottom). I made this app to demonstrate ~ provide an easy way to use the TTS functionality that MS Windows. I use it for emails, online texts, other reading - it has helped me greatly.

Follow the tinyURL to download:

http://tinyurl.com/ajxxed

NOTE: Save (without the trailing "_" char) to your desktop - to use - double-click.

If your browser doesn't let you adjust the name of the download -- you'll have to manually rename it once it get's to your download folder or desktop.

History:
v.14 mtb ~ 05/23/2009 ~ dropped requirement of Excel
v.12 mtb ~ 03/14/2009 ~ went graphical with buttons, allow pass in of command line text to be played (after which it quits), this now works in concert with BrowseThis.HTA (if present)

Google 'Gutenberg':

http://www.google.com/search?hl=en&q=gutenberg&btnG=Google+Search&aq=f&oq=

2008-11-03

Chrome_Incgonito(2).js

If you haven't updated to 0.3.154.9 this script may still be of use. But, with that version you can now append: ...chrome.exe" --incognito to your Google Chrome shortcut and it will start in Incognito mode by default.

The original script is much "thinner". The differences between them:

-checks to see if chrome is already started - if it has script simply quits.
-sets first URL to use google as a proxy

If you have trouble saving code snippits see notes here.
//Chrome_Incognito(2).js - start chrome incognito
var SN=WScript.ScriptName;
var oSh=new ActiveXObject('WScript.Shell');
var liWait=1500;//wait ms (double on older pc)
var sURL='http://translate.google.com/'+
  'translate'+'?ie=UTF-8'+
  '&sl=es'+'&tl=en'+'&hl=en'+'&u='+
  'http://www.anonymouse.org'
//-
//The above is a "google proxy" - translates a page from spanish to english
//this by default re-renders the same english trans - but allows you to
//escape beyond a firewall via google servers(if you need to) --
//anonymouse.org then hides your ip...
//-
var Chrome_HKLM='HKLM\\'+'SOFTWARE\\' + 
  'Classes\\'+'ChromeHTML\\' + 
  'shell\\'+'open\\'+ 'command\\';
Chrome=oSh.RegRead(Chrome_HKLM);
Chrome=Chrome.replace(' "%1"','');
//-
//Check to see if Chrome is already running...
//-
var oFS=new ActiveXObject('Scripting.FileSystemObject');
var sComspec=oSh.ExpandEnvironmentStrings('%COMSPEC%') 
var sSystemRoot=oSh.ExpandEnvironmentStrings('%SYSTEMROOT%') 
var sUserprofile=oSh.ExpandEnvironmentStrings('%USERPROFILE%');
sComspec=sComspec.replace(/%SystemRoot%/g,sSystemRoot);
sUserprofile=sUserprofile.replace(/\\/g,'\\');
var sRun='"'+
  sComspec+
  '" /c TaskList/v>"'+
sUserprofile+
  '\\My Documents\\TaskList.txt"';
oSh.Run(sRun,0,true);
var oTaskList;
var oTaskList_FN=sUserprofile+
  '\\My Documents\\TaskList.txt';
var oTaskList=oFS.OpenTextFile(oTaskList_FN,1);
var sTaskList_text=oTaskList.ReadAll();
oTaskList.Close();
var nFound=sTaskList_text.indexOf("chrome.exe");
  sRun='"'+
  sComspec+
  '" /c '+
  'if exist "'+sUserprofile+'\\My Documents\\TaskList.txt" '+
  'del "'+sUserprofile+'\\My Documents\\TaskList.txt"';
if (nFound!='-1')
 { oSh.popup('Google Chrome already appears to have been started...',3,SN);
  WScript.Quit();
 };
//-
//Run Chrome
//-
oSh.Run(Chrome,1,false);
var pid=false;
var sWTitle='New Tab - Google Chrome';
while (pid==false)
{ WScript.Sleep(250); 
 pid=oSh.AppActivate(sWTitle);
};
WScript.Sleep(liWait); 
oSh.Sendkeys('^+N');   //start new incognito window
WScript.Sleep(liWait); 
oSh.Sendkeys('%{Tab}');   //go previous(first) browser window
WScript.Sleep(liWait); 
oSh.Sendkeys('%{F4}');   //close first browser window
WScript.Sleep(liWait); 
oSh.Sendkeys('{F6}');   //go addressbar
WScript.Sleep(liWait); 
oSh.SendKeys(sURL+'{Enter}'); //supply 'google proxy'
WScript.Sleep(liWait); 

2008-10-26

Chrome_Incognito.js

If you haven't updated to 0.3.154.9 this script may still be of use. But, with that version you can now append: ...chrome.exe" --incognito to your Google Chrome shortcut and it will start in Incognito mode by default.

Save snippet below to a file (call it something like Chrome_Incognito.js) in 'My Documents' folder or the desktop. Double-click this file, & it opens a chrome browser window, then, an incognito window, then, shuts first window...leaving you "incognito".

If you have trouble saving code snippits see notes here.


//Chrome_Incognito.js - start chrome incognito
var oSh=new ActiveXObject("WScript.Shell");
var liWait=1500;  //wait ms (double on older pc)
var Chrome_HKLM="HKLM\\"+
  "SOFTWARE\\"+
  "Classes\\"+
  "ChromeHTML\\"+
  "shell\\"+
  "open\\"+
  "command\\";
var Chrome=oSh.RegRead(Chrome_HKLM);
oSh.Run(Chrome); //start chrome
WScript.Sleep(liWait);
oSh.Sendkeys("^+N"); //start new incognito window
WScript.Sleep(liWait);
oSh.Sendkeys("%{Tab}"); //go previous(first) browser window
WScript.Sleep(liWait);
oSh.Sendkeys("%{F4}"); //close first browser window


...here it is in .vbs (VBScript):
'Chrome_Incognito.vbs - start chrome incognito
Set oSh=CreateObject("WScript.Shell")
Dim Chrome_HKLM
Chrome_HKLM="HKLM\" & _
  "SOFTWARE\" & _
  "Classes\" & _
  "ChromeHTML\" & _
  "shell\" & _
  "open\" & _
  "command\"
Dim Chrome
Chrome=oSh.RegRead(Chrome_HKLM)
oSh.Run Chrome
ccSleep 1
oSh.Sendkeys "^+N"
ccSleep 1
oSh.Sendkeys "%{Tab}"
ccSleep 1
oSh.Sendkeys "%{F4}"
WScript.Quit
'-
Sub ccSleep(seconds)
  set oShell = CreateObject("Wscript.Shell")
  cmd = "%COMSPEC% /c ping -n " & 1 + seconds & " 127.0.0.1>nul"
  oShell.Run cmd,0,1
End Sub
'-this ccSleep I got from : http://www.mvps.org/scripting/rube/index.htm
Notes:

The saved file icon should display as fancy-scroll "S". If not -- the editor may be "helping" by automatically adding(& hiding) the ".txt" extention. To get around save in double-quotes: "Chrome_Incognito.js" -- and the name with this extention should "stick".

If double-clicking the file opens it in the editor -- script "open" is interpreting as "open with editor" -- to get around: ctrl+shift+click to obtain a context menu that will have an "Open with..." option. Choose this - then choose: "Microsoft (R) Windows Based Script" (and check "always use..." -- if you prefer it).

In these scripts I'd originally specified Run("Chrome.exe") - didn't always work. I tried adding instructions to check properties/copy settings from Google Chrome launch short-cut, but, again, found this didn't work for some users.

These scripts read system registry to determine Chrome location, and, hopefully, remove implementation differences and need for manual edit.

P.s. I've seen notes on the internet of starting chrome with '--incognito' startup parm -- but, that doesn't appear to work (at least with Google Chrome version 0.2.149.30 - does starting with 0.3.154.9).

P.s.s. If brave - try putting the snippet below at bottom of the first .js script from above.

This combines "Incognito" and using Google servers as a proxy to hide IP address. Having IP address logged I find an annoyance. Some software programs assume things and take unwanted actions based on returning IP address.

P.s.s.s.  These scripts and techniques work for me. If you have concerns about other "research" going on - the PC can be placed in in a public area to encourage safe (vs. anonymous) browsing habits.
var sURL=
"http://translate.google.com/"+
"translate"+
"?ie=UTF-8"+
"&sl=es"+
"&tl=en"+
"&hl=en"+
"&u="+
"http://www.anonymouse.org";
WScript.Sleep(liWait);
oSh.Sendkeys("{F6}");//go addressbar
WScript.Sleep(liWait);
oSh.SendKeys(sURL+"{Enter}");//supply "google proxy"
WScript.Sleep(liWait);

Some have asked if there's a way to check if Chrome is already running. To do so --is more complicated see version #2

-Thanks/regards

2008-10-22

GoogleProxy

This works well - but, I think Google's closed "english-to-english" --works though, if you do "Spanish-to-English".

Here's link to the original hack. There's a crucial note there -- this doesn't hide your IP address.

Chances are -- if you have a linksys or other box between your computer and the internet your real IP address is hidden anyway, helping to prevent hackers from directly attacking your computer. It does this be creating a bank of IP addresses that are one hop away from your computer. I've changed the translated link so that it will hide that IP address. This, hopefully, prevents a site from tracking your pseudo-unique-IP's return and using it against you.

Check_Remote.au3

rem -
rem Place in StartUp folder - it will check to see if you're
rem onsite or remote if remote it will start the  VPN dialer
rem with your fob-prefix...
rem -
rem requires AutoIt
rem -
@echo off
echo .>remote.txt
ping yourserver>>remote.txt
rem  ^-a server on your systems...
for /f %%i in ('find "timed out"^>remote.txt /c') do if not '0'=='%%i' goto offsite
goto xit
:offsite
echo Dim $fobpfx=RegRead('HKCU\Software\check_remote','^$fobpfx')>>VPN.au3
echo If $fobpfx='' Then >>VPN.au3
echo   $fobpfx=InputBox(@scriptname,'^$fobpfx','9999','*')>>VPN.au3
echo   RegWrite('HKCU\Software\check_remote','$fobpfx','REG_SZ',$fobpfx)>>VPN.au3
echo EndIf>>VPN.au3
echo Run('"C:\Program Files\Cisco Systems\VPN Client\ipsecdialer.exe"')>>VPN.au3
echo WinWaitActive('status:')>>VPN.au3
echo Send('{ctrlDown}o{ctrlUp}')>>VPN.au3
echo WinWaitActive('VPN Client')>>VPN.au3
echo Send($fobpfx)>>VPN.au3
call VPN.au3
goto xit
:xit
if exist remote.txt del remote.txt
if exist vpn.au3 del vpn.au3

2008-10-18

Browser - AutoFill

Save snippet as AutoFill.HTA - then fill out your own specifics in the javascript.

If you create a short-cut one with startup '...AutoFill.HTA" Work' and
one with startup '...AutoFill.HTA" Home' -- it will then start the app with
those preferences.
<html>
<head>
<hta:application
 icon='http://www.blogger.com/favicon.ico'
 id='oAutoFill'
 applicationname='AutoFill'
 >
<title>
AutoFill
</title>
</head>
<body
 onload='AutoFill_OnLoad()'
>
<div
 style="font-family: verdana; font-size: 8pt;"
 >
 I come here and drag/drop into the browser <br>
 preference/setup pages.
</div>
<form 
 name='frmFill'
 >
 <table 
  style="font-family: verdana; font-size: 8pt;"
  >
  <tr>
   <td 
    style='font-family: verdana;font-size: 8pt;'
    >
    T<u>y</u>pe
   </td>
   <td
    style='font-family: verdana;font-size: 8pt;'
    >
    <select 
     id='lstType' 
     onchange='lstType_Change()'
     accesskey='y'
     >
     <option 
      selected 
      value='...'
      >...
     <option 
      value='Home'
      >Home
     <option 
      value='Work'
      >Work
    </select>
   </td>
  </tr>
  <tr>
   <td
    style='font-type:verdana;font-size:12'
    >    
    <u>F</u>irst  
   </td>
   <td>
    <input 
     type='text' 
     id='txtFirst' 
     value='Michael' 
     style='width:105px'
     accesskey='F'
     />
   </td>
   <td
    style='font-type:verdana;font-size:12'
    >
    <u>L</u>ast  
   </td>
   <td>
    <input 
     type='text' 
     id='txtLast' 
     value='Bee'  
     style='width:105px'
     accesskey='L'
     />
   </td>
  </tr>
  <tr>
   <td
    style='font-type:verdana;font-size:12'
    >
    <U>E</u>-mail  
   </td>
   <td>
    <input 
     type='text' 
     id='txtEMail'     
     style='width:105px'
     accesskey='e'
     />
   </td>
   <td
    style='font-type:verdana;font-size:12'
    ><u>H</u>ome page
   </td>
   <td>
    <input 
     type='text' 
     id='txtHomepage' 
     style='width:105px'
     accesskey='h'
     />
   </td>
  </tr>
  <tr>
   <td  
    style='font-type:verdana;font-size:12'
    >
    <u>T</u>elephone 
   </td>
   <td>
    <input 
     type='text' 
     id='txtTelephone' 
     style='width:105px'
     accesskey='t'
     />
   </td>
   <td     
    style='font-type:verdana;font-size:12'
    >
    <u>M</u>obile  
   </td>
   <td>
    <input 
     type='text' 
     id='txtMobile' 
     style='width:105px'
     accesskey='m'
    />
   </td>
  </tr>
  <tr>
   <td     
    style='font-type:verdana;font-size:12'
    >
    <u>A</u>ddress  
   </td>
   <td colspan=3>
    <input 
     type='text' 
     id='txtAddr' 
     style='width:287px'
     accesskey='a'
     />
   </td>
  </tr>
  <tr>
   <td     
    style='font-type:verdana;font-size:12'
    >
    <U>C</u>ity  
   </td>
   <td>
    <input 
     type='text' 
     id='txtCity' 
     style='width:105px'
     accesskey='c'
     />
   </td>
   <td     
    style='font-type:verdana;font-size:12'
    >
    <U>R</u>egion/State
   </td>
   <td>
    <input 
     type='text' 
     id='txtRegSt' 
     style='width:105px'
     accesskey='r'
    />
   </td>
  </tr>
  <td     
   style='font-type:verdana;font-size:12'
   >
   <u>P</u>ostal Code 
  </td>
  <td>
   <input 
    type='text' 
    id='txtPostalCode' 
    style='width:105px'
    accesskey='p'
   >
  </td>
   <td     
    style='font-type:verdana;font-size:12'
    >
    C<u>o</u>untry  
   </td>
   <td>
    <input 
     type='text' 
     id='txtCountry' 
     style='width:105px'
     accesskey='o'
     />
   </td>
  </tr>
 </table>
</form>
<script>
function lstType_Change()
{
//alert(frmFill.lstType.value);
var lChoice=frmFill.lstType.value;
switch (lChoice)
{
case '...':
{
frmFill.txtEMail.value='';
frmFill.txtHomepage.value='';
frmFill.txtTelephone.value='';
frmFill.txtMobile.value='';
frmFill.txtAddr.value='';
frmFill.txtCity.value='';
frmFill.txtRegSt.value='';
frmFill.txtPostalCode.value='';
frmFill.txtCountry.value='';
};
break;
case 'Home':
{
frmFill.txtEMail.value='home_email_pfx'+
'@home_email_sfx';
frmFill.txtHomepage.value='home_homepage_pfx'+
'home_homepage_sfx';
frmFill.txtTelephone.value='home_phn';
frmFill.txtMobile.value='home_mobile_phn';
frmFill.txtAddr.value='home_addr';
frmFill.txtCity.value='home_city';
frmFill.txtRegSt.value='home_regst';
frmFill.txtPostalCode.value='home_postal';
frmFill.txtCountry.value='home_country';
};
break;
case 'Work':
{
frmFill.txtEMail.value='work_email_pfx'+
'@work_email_sfx';
frmFill.txtHomepage.value='work_homepage_pfx'+
'work_homepage_sfx';
frmFill.txtTelephone.value='work_phn';
frmFill.txtMobile.value='work_mobile_phn';
frmFill.txtAddr.value='work_addr';
frmFill.txtCity.value='work_city';
frmFill.txtRegSt.value='work_regst';
frmFill.txtPostalCode.value='work_postal';
frmFill.txtCountry.value='work_country';
};
break;
};
window.document.title='AutoFill '+'['+frmFill.lstType.value+']';
}
function AutoFill_OnLoad()
{
 window.resizeTo(465, 311);
 window.moveTo(305, 133);
 var tra_st=oAutoFill.commandLine.indexOf('.HTA"');
 tra_st=tra_st+6;
 var tra_end=tra_st+4;
 var tra_chars=oAutoFill.commandLine.slice(tra_st,tra_end);
 switch (tra_chars)
 {
 case 'Home':
  {
   frmFill.lstType.value='Home';
   break;
  };

 case 'Work':
  {
   frmFill.lstType.value='Work';
   break;
  };
 };
 lstType_Change();
}
</script>

2008-08-10

Google as proxy

Google hacks contained entry for using Google as proxy -- basically you translate a page from english to english -- and, viola. Google servers become the gobetween). Unfortunately, this no longer works -- but, fortunately, if you translate from es|en you get the same effect. Note: This does NOT hide your ip address. It simply allows you to go to another server to get out from behind a firewall (if you need to).

Chances are -- if you have a linksys or other box between your computer and the internet your real IP address is hidden anyway, helping to prevent hackers from directly attacking your computer. It does this be creating a bank of IP addresses that are one hop away from your computer. I've changed the translated link so that it will hide that IP address. This, hopefully, prevents a site from tracking your pseudo-unique-IP's return and using it against you.

This reference to Anonymouse.org should hide your ip. :) EXAMPLE: http://www.google.com/translate?langpair=es|en&u=www.anonymouse.org Try it & then try your real IP generated here... http://www.arin.net/whois/

LibriVox's New Releases

Blog Archive

Powered By Blogger