Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Help requested from Nitz or other script masters  (Read 2118 times)

0 Members and 1 Guest are viewing this topic.

TopJimmyCooks

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2097
  • Last login:March 26, 2024, 01:18:39 pm
Help requested from Nitz or other script masters
« on: February 13, 2012, 01:08:14 pm »
I have a bat file to rotate my monitor to horizontal if I exit mala in vertical orientation:

Code: [Select]
@echo off
smccmd --speed -1500

It works but shows a brief flash of a cmd window.  How can I change this so that cmd doesn't show at all?

Also, I wonder if I can do something AHK wise to help with this other problem http://forum.arcadecontrols.com/index.php?topic=115904.0?  Thanks.

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:June 14, 2025, 06:26:06 pm
  • <insert personal text here>
Re: Help requested from Nitz or other script masters
« Reply #1 on: February 13, 2012, 01:20:37 pm »
With this, same thing I used to fix the focus stealing bat in my Tron Switch

Code: [Select]
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\arcade\tronswitch\4way.bat" & Chr(34), 0
Set WshShell = Nothing


All you should need to change is stuff in "" and then have MALA point at this rather than your bat.

You save it as a .vbs

As for the sound issue, that's out of my depth.

Let me know if that solves you issue.  
« Last Edit: February 13, 2012, 01:23:28 pm by Le Chuck »

TopJimmyCooks

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2097
  • Last login:March 26, 2024, 01:18:39 pm
Re: Help requested from Nitz or other script masters
« Reply #2 on: February 13, 2012, 01:26:41 pm »
I saw that in your thread but was afraid to jump on it because I'm not familiar with WshShell or the .vbs extension.  (visual basic?)  You mean change "C:\arcade . . ." to my bat file and directory but leave "WScript.Shell" as is, right?  I'll give it a try.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 11:01:57 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Help requested from Nitz or other script masters
« Reply #3 on: February 13, 2012, 01:27:40 pm »
Ok I'm not familair with mala's settings that much so this may be a dumb question... but why are you using a batch file anyway?  Why not run the program directly?  If it has the option to launch a bat then it should have the option to run a exe with command line options right?


Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:June 14, 2025, 06:26:06 pm
  • <insert personal text here>
Re: Help requested from Nitz or other script masters
« Reply #4 on: February 13, 2012, 01:37:13 pm »
Howard, I'll need to check if you can enter it in directly like that.  For some reason I think that you have to point it at an exe or bat but that it doesn't have a way to add in the command line options.  Hrmm.  I know that when I made my AHK script I was having trouble getting it to call USCCMD directly so I did this work-around.  That, I am sure, is because I am a crappy coder rather than it being impossible to do.    

Jimmy, I pulled that thing right off of google because i was having a similar issue.  Sorry that I was unclear, just change the bat file location "C:\arcade..." and leave everything else the same.  I need to go home and look at the script because I can't remember if you leave the "" around it or not.  I would normally say no but can't recall.  Too easy to try it both ways.  I had to get down next to my servo and listen for the clicks to tell if it was working the first time I ran it because I thought nothing happened.  Nice little script.  
« Last Edit: February 13, 2012, 01:38:50 pm by Le Chuck »

TopJimmyCooks

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2097
  • Last login:March 26, 2024, 01:18:39 pm
Re: Help requested from Nitz or other script masters
« Reply #5 on: February 13, 2012, 02:08:41 pm »
Howard, this comes up because MaLa can run an exe or bat upon closing.  When the normal rotation's happening in Mala during operation, I do have DaOldMan's startcom program just doing the command line stuff for the pololu SMC program without a bat involved.

Edit:
I tried to put the command line smccmd call with and without location in the "run when Mala exits" box, and it didn't work.  jive's with my memory from last summer setting up the rotation.  Not everything will work in that box.  bats yes, bat converted to exe, no, and now .vbs, yes.  smccmd is installed as a service and should run regardless of location, etc.

Chuck: I used your .vbs to call the bat and it worked silently.  Thanks.
« Last Edit: February 13, 2012, 09:32:28 pm by TopJimmyCooks »

nitz

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 507
  • Last login:November 24, 2015, 07:57:29 pm
Re: Help requested from Nitz or other script masters
« Reply #6 on: February 13, 2012, 09:48:32 pm »
What??? I heard my name! Oh, you've got it fixed...nevermind then. ;D

I am gonna post in your other thread though about the Mala issue. ;)

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:June 14, 2025, 06:26:06 pm
  • <insert personal text here>
Re: Help requested from Nitz or other script masters
« Reply #7 on: February 14, 2012, 03:39:21 am »

Chuck: I used your .vbs to call the bat and it worked silently.  Thanks.

 :cheers: one is glad to be of service.